Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactoring, following Pylint #3

Open
7 tasks
evertrol opened this issue Mar 23, 2020 · 0 comments
Open
7 tasks

Refactoring, following Pylint #3

evertrol opened this issue Mar 23, 2020 · 0 comments

Comments

@evertrol
Copy link
Member

evertrol commented Mar 23, 2020

Pylint still leaves some suggestions, which are swept under the rug by use of command line flags disabling them:

  • reduce amount of local variables (too-many-locals)
  • reduce amount of branches (too-many-branches)
  • reduce amount of arguments (too-many-arguments)
  • reduce amount of statements (too-many-statements)
  • replace or expand classes (too-few-public-methods)
  • reduce duplicate code (duplicate-code)
  • use consistent names (not a Pylint warning)

Notes:

  • for some functions, it may be useful to have all arguments spelled out, instead of having a Matplotlib-like solution with **kwargs. A config dict could be an alternative, but this is less clear as well (and basically the same as just `**kwargs``).
  • classes with too few public methods were created to allow multi-parameter functions be used in multiprocessing, using the __call__ method of classes. functools.partial could replace this.
  • consistent names concerns options/arguments/variables such as reference_period vs control_period.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant