-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsetup.cfg
108 lines (91 loc) · 3.22 KB
/
setup.cfg
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
[flake8]
# Base flake8 configuration:
# https://flake8.pycqa.org/en/latest/user/configuration.html
format = default
show-source = true
statistics = true
doctests = true
# flake8-type-checking
# https://github.com/snok/flake8-type-checking#choosing-how-to-handle-forward-references
enable-extensions = TC, TC1
# darglint configuration:
# https://github.com/terrencepreilly/darglint
strictness = long
docstring-style = numpy
# flake8-quotes
inline-quotes = "
# Plugins:
max-complexity = 6
max-line-length = 80
# flake8-typing-imports
min_python_version = 3.10.0
# flake8-type-checking
type-checking-exempt-modules = typing,typing_extensions
type-checking-pydantic-enabled = false
# type-checking-pydantic-enabled-baseclass-passlist = NamedTuple,TypedDict
type-checking-fastapi-enabled = false
type-checking-fastapi-dependency-support-enabled = false
type-checking-cattrs-enabled = false
# flake8-pytest-style
pytest-parametrize-names-type = csv
# Disable some pydocstyle checks:
# Exclude some pydoctest checks globally:
ignore = X100,
# pydocstyle
# http://www.pydocstyle.org/en/2.1.1/error_codes.html
D1 Missing docstrings
D400 First line should end with a period
D401 First line should be in imperative mood
# darglint
# https://github.com/terrencepreilly/darglint#error-codes
DAR103 The docstring parameter type doesn't match function
DAR203 The docstring parameter type doesn't match function.
# flake8-pie
# already caught by pylint
PIE786 too broad exception
# pylint
# https://pylint.pycqa.org/en/latest/messages/messages_list.html
PLC0103 (invalid-name)
PLC0114 (missing-module-docstring)
PLC0115 (missing-class-docstring)
PLC0116 (missing-function-docstring)
PLE0401 (import-error)
PLE0601 (used-before-assignment) # not working with `if TYPE_CHECKING:`
PLE0611 (no-name-in-module)
PLE1101 (no-member)
PLR0201 (no-self-use)
PLR0902 (too-many-instance-attributes)
PLR0903 (too-few-public-methods)
PLR0904 (too-many-public-methods)
PLR0913 (too-many-arguments)
PLR6301 (no-self-use)
PLW0401 (wildcard-import)
PLW0511 (fixme) # duplicate flake8-fixme functionality
PLW0603 (global-statement)
PLW0614 (unused-wildcard-import)
PLW1514 (unspecified-encoding)
# flake8-pytest-style
PT011 pytest.raises(ValueError) is too broad
# flake8-rst-docstrings
# https://github.com/peterjc/flake8-rst-docstrings#flake8-validation-codes
RST201 Block quote ends without a blank line
RST203 Definition list ends without a blank line
RST301 Unexpected indentation
RST303 Unknown directive type "*"
RST304 Unknown interpreted text role "*"
# flake8-fixme
T101 fixme found (TODO)
# pycodestyle
W504 Line break after binary operator
# Excluding some directories:
exclude =
.git
__pycache__
.venv
.eggs
*.egg
**/migrations/*.py
# Ignoring some errors in some files:
per-file-ignores =
# Enable `assert` keyword and magic numbers for tests:
tests/*.py: S101, PLW0621