Skip to content

Refactor preprocessing.py:preprocess(input_string,preprocessing_steps,remove_punctuation,remove_stopwords)Β #1

@thalesbertaglia

Description

@thalesbertaglia

I've selected preprocessing.py:preprocess(input_string,preprocessing_steps,remove_punctuation,remove_stopwords) for refactoring, which is a unit of 9 lines of code and 4 parameters. Addressing this will make our codebase more maintainable and improve Better Code Hub's Keep Unit Interfaces Small guideline rating! πŸ‘

Here's the gist of this guideline:

  • Definition πŸ“–
    Limit the number of parameters per unit to at most 4.
  • Why❓
    Keeping the number of parameters low makes units easier to understand, test and reuse.
  • How πŸ”§
    Reduce the number of parameters by grouping related parameters into objects. Alternatively, try extracting parts of units that require fewer parameters.

You can find more info about this guideline in Building Maintainable Software. πŸ“–


ℹ️ To know how many other refactoring candidates need addressing to get a guideline compliant, select some by clicking on the πŸ”² next to them. The risk profile below the candidates signals (βœ…) when it's enough! 🏁


Good luck and happy coding! :shipit: ✨ πŸ’―

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions