# Minimum Python syntax support target-version = "py39" line-length = 120 exclude = [ ".git", "**/__pycache__", "/**/doc/conf.py", "/**/__init__.py", "setup.py", ] [lint] ignore = [ "E266", # Too many leading '#' for block comment "B006", # do not use mutable data structures for argument defaults (too many false positives) "E501", # line length, exceeded by some docstrings "W605", # TODO (to be fixed), invalid escape sequence, necessary for sphinx directives in docstrings but should switch to raw string "D301", # Same reason as W605 "D10", # D100-107, missing docstring in public function, class etc (yes we should have docstrings for all public methods, but that is a pipe dream) "D400", # First line of docstring should end with a period (assumes the summary fits on one line, which is not always the case) "D205", # 1 blank line required between summary line and description (Makes same assumption as D400) "D200", # One-line docstring should fit on one line, don't like this because it enforces inconsistent formatting between one-line and multi-line docstrings "D202", # No blank lines allowed after function docstring (silly rule, if formatter doesn't enforce it then checks shouldn't either) "D401", # First line of docstring should be in imperative mood (silly rule) "D404", # First word of the docstring should not be "This" (Probably a good rule to follow going forward but it occurs in so many places in our code and it's not a big enough issue to warrant fixing) ] select = [ "B", "D", "E", "F", "W", ] [lint.pydocstyle] convention = "numpy" [format] quote-style = "double" indent-style = "space" docstring-code-format = true [lint.per-file-ignores] "tests/*" = ["D"] # Ignore docstring checks in tests