Skip to content

Lint - disable using getattr in the project #1332

@tjhunter

Description

@tjhunter

Describe the task. It can be a feature, documentation, etc.

getattr makes sense in very few places in our project, and it usually hides other issues.

  • inspect/remove all places where it is used
  • put a linter rule in place

The easiest would be to use pylint for instance:

[tool.pylint.main]
load-plugins=pylint.extensions.badbuiltin

[tool.pylint.TYPECHECK]
bad-functions=getattr

This rule should be activated both with scripts.sh lint and script.sh lint-check (people running lint expect that a success means it will pass lint-check)

Hedgedoc URL, if you are keeping notes, plots, logs in hedgedoc.

No response

Area

  • datasets, data readers, data preparation and transfer
  • model
  • science
  • infrastructure and engineering
  • evaluation, export and visualization
  • documentation

Metadata

Metadata

Assignees

Labels

good first issueGood for newcomersinfraIssues related to infrastructure

Type

No type

Projects

Status

No status

Relationships

None yet

Development

No branches or pull requests

Issue actions