-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathpyproject.toml
176 lines (153 loc) · 4.95 KB
/
pyproject.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
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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
[build-system]
requires = ["setuptools>=43", "wheel", "setuptools_scm[toml]>=3.4"]
build-backend = "setuptools.build_meta"
# ==============================================================================
[tool.ruff]
line-length = 120
target-version = 'py38'
select = ['F', # pyflakes
'E', # pycodestyle
'W', # pycodestyle
'C90', # mccabe
'I', # isort
'N', # pep8-naming
'D', # pydocstyle
'UP', # pyupgrade
'YTT', # flake-2020
'ANN', # flake8-annotations
'ASYNC', # flake8-async
'TRIO', # flake8-trio
'S', # flake8-bandit
'BLE', # flake8-blind-except
'FBT', # flake8-boolean-trap
'B', # flake8-bugbear
'A', # flake8-builtins
'C4', # flake8-comprehensions
'DTZ', # flake8-datetimez
'T10', # flake8-debugger
'EM', # flake8-errmsg
'EXE', # flake8-executable
'FA', # flake8-future-annotations
'ISC', # flake8-implicit-str-concat
'ICN', # flake8-import-conventions
'G', # flake8-logging-format
'PIE', # flake8-pie
'PT', # flake8-pytest-style
'Q', # flake8-quotes
'RSE', # flake8-raise
'RET', # flake8-return
'SLF', # flake8-self
'SLOT', # flake8-slots
'SIM', # flake8-simplify
'TID', # flake8-tidy-imports
'TCH', # flake8-type-checking
'INT', # flake8-gettext
'ARG', # flake8-unused-arguments
'PTH', # flake8-use-pathlib
'TD', # flake8-todos
'FIX', # flake8-fixme
'ERA', # eradicate
'PL', # pylint
'TRY', # tryceratops
'FLY', # flynt
'NPY', # numpy specific rules
'PERF', # perflint
'FURB', # refurb
'LOG', # flake8-logging
'RUF', # ruff-specific rules
]
ignore = ['ANN101', # missing-type-self
'D203', # one-blank-line-before-class
'D212', # multi-line-summary-first-line
'S603', # subprocess-without-shell-equals-true
# Ignore rulues below are actually to prevent conflicts between formatting and linting (with fixing)
# cf. https://docs.astral.sh/ruff/formatter/#conflicting-lint-rules
'COM812', # missing-trailing-comma
'COM819', # prohibited-trailing-comma
'D206', # indent-with-spaces
'E111', # indentation-with-invalid-multiple
'E114', # indentation-with-invalid-multiple-comment
'E117', # over-indented
'ISC001', # single-line-implicit-string-concatenation
'ISC002', # multi-line-implicit-string-concatenation
'Q000', # bad-quotes-inline-string
'Q001', # bad-quotes-multiline-string
'Q002', # bad-quotes-docstring
'Q003', # avoidable-escaped-quote
'S603', # subprocess-without-shell-equals-true
'W191', # tab-indentation
]
[tool.ruff.format]
quote-style = "single"
indent-style = "space"
line-ending = 'lf'
skip-magic-trailing-comma = false
[tool.ruff.per-file-ignores]
'tests/*.py' = ['S101', 'SLF001', 'PLR0913', 'PLR2004', 'D']
[tool.ruff.flake8-annotations]
allow-star-arg-any = true
ignore-fully-untyped = true
mypy-init-return = true
suppress-dummy-args = true
suppress-none-returning = true
[tool.ruff.flake8-quotes]
docstring-quotes = 'double'
inline-quotes = 'single'
multiline-quotes = 'single'
[tool.ruff.isort]
combine-as-imports = true
section-order = ["future", "standard-library", "first-party", "third-party", "local-folder"]
split-on-trailing-comma = false
[tool.ruff.pep8-naming]
ignore-names = ['visit_Assert', 'visit_Call', 'visit_Import', 'visit_ImportFrom', 'visit_With']
[tool.ruff.pydocstyle]
convention = 'google'
# ==============================================================================
[tool.black]
line-length = 120
target-version = ['py38','py39','py310']
skip-string-normalization = true
[tool.check-manifest]
ignore = [
'PKG-INFO',
'*.egg-info',
'*.egg-info/*',
'setup.cfg',
'.hgtags',
'.hgsigs',
'.hgignore',
'.gitignore',
'.bzrignore',
'.gitattributes',
'.github/*',
'.travis.yml',
'Jenkinsfile',
'*.mo',
'.gitmodules',
'VERSION.txt',
'.editorconfig',
'.envrc',
'*.yml',
'*.yaml',
'requirements_tests.txt',
'MANIFEST.in',
'docs/*',
'docs/images/*',
'misc/*',
'tests/*',
]
[tool.coverage]
[tool.coverage.run]
omit = [
'*_test.py',
'*_fixtures.py'
]
[tool.pytest.ini_options]
minversion = '6.0'
addopts = '-pno:warnings'
testpaths = ['tests']
mock_use_standalone_module = true
[tool.setuptools_scm]
write_to = 'VERSION.txt'
write_to_template = '{version}'
local_scheme = 'no-local-version'