@@ -50,11 +50,9 @@ test = [
50
50
" pytest-pretty>=1.0.0,<2.0.0" ,
51
51
]
52
52
quality = [
53
- " ruff==0.1.0" ,
54
- " mypy==1.5.1" ,
55
- " black==23.3.0" ,
56
- " bandit[toml]>=1.7.0,<1.8.0" ,
57
- " pre-commit>=2.17.0,<3.0.0" ,
53
+ " ruff==0.1.9" ,
54
+ " mypy==1.8.0" ,
55
+ " pre-commit>=3.0.0,<4.0.0" ,
58
56
]
59
57
docs = [
60
58
" sphinx>=3.0.0,!=3.5.0" ,
@@ -80,11 +78,9 @@ dev = [
80
78
" pytest-xdist>=3.0.0,<4.0.0" ,
81
79
" pytest-pretty>=1.0.0,<2.0.0" ,
82
80
# style
83
- " ruff==0.1.0" ,
84
- " mypy==1.5.1" ,
85
- " black==23.3.0" ,
86
- " bandit[toml]>=1.7.0,<1.8.0" ,
87
- " pre-commit>=2.17.0,<3.0.0" ,
81
+ " ruff==0.1.9" ,
82
+ " mypy==1.8.0" ,
83
+ " pre-commit>=3.0.0,<4.0.0" ,
88
84
# docs
89
85
" sphinx>=3.0.0,!=3.5.0" ,
90
86
" furo>=2022.3.4" ,
@@ -133,6 +129,16 @@ select = [
133
129
" T20" , # flake8-print
134
130
" PT" , # flake8-pytest-style
135
131
" LOG" , # flake8-logging
132
+ " SIM" , # flake8-simplify
133
+ " YTT" , # flake8-2020
134
+ " ANN" , # flake8-annotations
135
+ " ASYNC" , # flake8-async
136
+ " BLE" , # flake8-blind-except
137
+ " A" , # flake8-builtins
138
+ " ICN" , # flake8-import-conventions
139
+ " PIE" , # flake8-pie
140
+ " ARG" , # flake8-unused-arguments
141
+ " FURB" , # refurb
136
142
]
137
143
ignore = [
138
144
" E501" , # line too long, handled by black
@@ -142,20 +148,31 @@ ignore = [
142
148
" F403" , # star imports
143
149
" E731" , # lambda assignment
144
150
" C416" , # list comprehension to list()
151
+ " ANN101" , # missing type annotations on self
152
+ " ANN102" , # missing type annotations on cls
153
+ " ANN002" , # missing type annotations on *args
154
+ " ANN003" , # missing type annotations on **kwargs
155
+ " COM812" , # trailing comma missing
145
156
" N812" , # lowercase imported as non-lowercase
157
+ " ISC001" , # implicit string concatenation (handled by format)
158
+ " ANN401" , # Dynamically typed expressions (typing.Any) are disallowed
146
159
]
147
160
exclude = [" .git" ]
148
161
line-length = 120
149
162
target-version = " py39"
150
163
preview = true
151
164
165
+ [tool .ruff .format ]
166
+ quote-style = " double"
167
+ indent-style = " space"
168
+
152
169
[tool .ruff .per-file-ignores ]
153
170
"**/__init__.py" = [" I001" , " F401" , " CPY001" ]
154
- "scripts/**.py" = [" D" , " T201" , " N812" ]
155
- ".github/**.py" = [" D" , " T201" , " S602" ]
156
- "docs/**.py" = [" E402" , " D103" ]
157
- "tests/**.py" = [" D103" , " CPY001" , " S101" , " PT011" ,]
158
- "demo/**.py" = [" D103" ]
171
+ "scripts/**.py" = [" D" , " T201" , " N812" , " S101 " , " ANN " ]
172
+ ".github/**.py" = [" D" , " T201" , " S602" , " S101 " , " ANN " ]
173
+ "docs/**.py" = [" E402" , " D103" , " ANN " , " A001 " , " ARG001 " ]
174
+ "tests/**.py" = [" D103" , " CPY001" , " S101" , " PT011" , " ANN " ]
175
+ "demo/**.py" = [" D103" , " ANN " ]
159
176
"setup.py" = [" T201" ]
160
177
161
178
[tool .ruff .flake8-quotes ]
@@ -177,18 +194,11 @@ no_implicit_optional = true
177
194
check_untyped_defs = true
178
195
implicit_reexport = false
179
196
disallow_untyped_defs = true
197
+ explicit_package_bases = true
180
198
181
199
[[tool .mypy .overrides ]]
182
200
module = [
183
201
" PIL" ,
184
202
" matplotlib"
185
203
]
186
204
ignore_missing_imports = true
187
-
188
- [tool .black ]
189
- line-length = 120
190
- target-version = [' py39' ]
191
-
192
- [tool .bandit ]
193
- exclude_dirs = [" .github/collect_env.py" ]
194
- skips = [" B101" ]
0 commit comments