forked from scipy/scipy
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathlint.toml
47 lines (38 loc) · 1.44 KB
/
lint.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
exclude = [
"scipy/_build_utils/tempita/*",
"scipy/_lib/_docscrape.py",
"scipy/datasets/_registry.py",
]
force-exclude = true
line-length = 88
# Assume Python 3.10
target-version = "py310"
[lint]
# Enable Pyflakes `E` and `F` and PyUpgrade `UP` codes by default.
# Also, `PGH004` which checks for blanket (non-specific) `noqa`s
# and `B028` which checks that warnings include the `stacklevel` keyword.
# `B006` and `B008` added in gh-21284 to forbid mutable defaults.
# `B028` added in gh-19623.
# `ICN001` added in gh-20382 to enforce common conventions for import.
# `W292` added in gh-21023 to enforce newlines at end of files.
select = ["E", "F", "PGH004", "UP", "B006", "B008", "B028", "ICN001", "W292"]
ignore = ["E741", "UP038"]
# Allow unused variables when underscore-prefixed.
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
[lint.per-file-ignores]
"**/__init__.py" = ["E402", "F401", "F403", "F405"]
"scipy/linalg/lapack.py" = ["F405"]
"scipy/stats/tests/data/_mvt.py" = ["E501", "E701", "E702"]
# E501 (line length) ignores
"scipy/constants/_codata.py" = ["E501"]
"scipy/linalg/_cython_signature_generator.py" = ["E501"]
"scipy/linalg/_generate_pyx.py" = ["E501"]
"scipy/spatial/transform/_rotation.pyi" = ["E501"]
"doc/source/doi_role.py" = ["B006"]
[lint.flake8-import-conventions.aliases]
numpy = "np"
[lint.mccabe]
# Unlike Flake8, default to a complexity level of 10.
max-complexity = 10
[lint.pydocstyle]
convention = "numpy"