Skip to content

Refactoring, following Pylint #3

@evertrol

Description

@evertrol

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.

Metadata

Metadata

Assignees

No one assigned

    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