Skip to content

Commit

Permalink
Fix flake8 configuration, add reasoning to ignores
Browse files Browse the repository at this point in the history
* From PyCQA/flake8#1760:
  "surprise surprise! your configuration has been silently wrong for years"
  • Loading branch information
wangenau committed Nov 28, 2022
1 parent 509d625 commit 5d08a09
Showing 1 changed file with 19 additions and 8 deletions.
27 changes: 19 additions & 8 deletions .flake8
Expand Up @@ -5,17 +5,28 @@ docstring-convention = google
import-order-style = google
application-import-names = eminus

ignore = E741, E743, \ # Ambiguous variable names and function definitions
W504, \ # Line break after binary operator
D107, \ # Missing docstring in __init__
D300, \ # Use double quotes for docstrings
D417 # A bug results in false positives
# TODO: Remove if pydocstyle ever gets updated
ignore =
# E741, E743: Ambiguous variable names and function definitions
# eminus uses, e.g., l (quantum number) as variables or O (overlap operator) as functions
E741, E743,
# W504: Line break after binary operator
# There will always be a line break around some operators, ignore this over W503
W504,
# D107: Missing docstring in __init__
# Docstrings are present in the class definition instead of the init method
D107,
# D300: Use double quotes for docstrings
# Use triple single quotes for docstrings
D300,
# D417: A bug results in false positives
# TODO: Remove if pydocstyle ever gets updated
D417

# D100, D103: Ignore missing docstrings in public modules or functions
# E501, W505: Ignore line length warnings
per-file-ignores = examples/*:D100,D103,E501,W505,
tests/*:D103
per-file-ignores =
examples/*:D100,D103,E501,W505,
tests/*:D103

# Exclude the generated docs folder
exclude = public

0 comments on commit 5d08a09

Please sign in to comment.