Skip to content

Commit

Permalink
Clean up pylint errors via config options
Browse files Browse the repository at this point in the history
The majority of pylint gripes are related to Astropy modules with
dynamically generated attributes (units and constants) and short and
quirky variable names (a, b, c, P1). Disable these to get a respectable
pylint score :-) Also document the max line length in case we want to
change it one day.

The alternative to setup.cfg would have been the newer and shinier
pyproject.toml. Both these files support pylint options these days,
which is preferable to the old .pylintrc which just clutters up the
directory. Prefer setup.cfg for now since flake8 does not support the
newer file (https://gitlab.com/pycqa/flake8/-/issues/428).
  • Loading branch information
ludwigschwardt committed Oct 19, 2020
1 parent 099af4b commit 1685c04
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,15 @@ universal = 1

[flake8]
max-line-length = 120

[pylint.MESSAGES CONTROL]
# Katpoint has many short and quirky variable names - leave it for now
disable = invalid-name

[pylint.TYPECHECK]
# These Astropy modules generate most of their members
ignored-modules = astropy.units,astropy.constants

[pylint.FORMAT]
# The default is 120, but put it in here for visibility if we want to change it
max-line-length = 120

0 comments on commit 1685c04

Please sign in to comment.