@@ -117,49 +117,21 @@ dependencies = [
117
117
requires = [" setuptools>=65" , " wheel" ]
118
118
build-backend = " setuptools.build_meta"
119
119
120
+
121
+ [tool .codespell ]
122
+ ignore-words-list = " 3rt,abd,aer,ans,bitap,crate,damon,fo,followings,hist,iff,kwanza,manuel,mater,secant,som,sur,tim,toi,zar"
123
+ skip = " *.css,*.js,*.lock"
124
+
120
125
[tool .ruff ]
121
126
line-length = 88
122
127
target-version = " py313"
123
- select = [
124
- " E" , " W" , " F" , " I" , " B" , " C4" , " UP" , " YTT" ,
125
- " EM" , " EXE" , " G" , " ISC" , " PLC" , " PLW" , " PT" , " S" , " SIM" , " SLF"
126
- ]
127
-
128
+ select = [" E" , " F" , " I" , " B" , " UP" , " YTT" , " PLC" , " PT" , " SIM" ]
128
129
ignore = [
129
- " B101" ,
130
- " B904" , # Within an `except` clause, raise exceptions with `raise ... from err`
131
- " B905" , # `zip()` without an explicit `strict=` parameter
132
- " EM101" , # Exception must not use a string literal
133
- " EXE001" , # Shebang is present but file is not executable
134
- " G004" , # Logging statement uses f-string
135
- " ISC001" , # Conflicts with ruff format
136
- " PLC0415" ,# import-outside-top-level
137
- " PLC1901" ,# `{}` can be simplified to `{}` as an empty string is falsey
138
- " PLW060" , # Using global without assignment
139
- " PLW1641" ,# eq-without-hash
140
- " PLW2901" ,# Redefined loop variable
141
- " PT011" , # pytest.raises(Exception) is too broad
142
- " PT018" , # Assertion should be broken down
143
- " PT028" , # pytest-parameter-with-default-argument
144
- " S101" , # Use of `assert` detected
145
- " S311" , # Standard pseudo-random generators
146
- " SIM905" , # Consider using a list literal instead of `str.split`
147
- " SLF001" , # Private member accessed
148
- " UP038" , # Use `X | Y` in `{}` call
130
+ " B101" , " B904" , " B905" , " PLC0415" ,
131
+ " PLW2901" , " PT011" , " PT018" , " PT028" ,
132
+ " S101" , " SIM905" , " UP038"
149
133
]
150
134
151
- max-args = 10
152
- max-branches = 20
153
- max-returns = 8
154
- max-statements = 88
155
-
156
- [tool .codespell ]
157
- ignore-words-list = " 3rt,abd,aer,ans,bitap,crate,damon,fo,followings,hist,iff,kwanza,manuel,mater,secant,som,sur,tim,toi,zar"
158
- skip = " *.css,*.js,*.lock"
159
- [tool .ruff .lint .isort ]
160
- known-first-party = [" python" ]
161
- combine-as-imports = true
162
-
163
135
[tool .ruff .lint .per-file-ignores ]
164
136
"__init__.py" = [" F401" ]
165
137
"tests/**" = [" S101" , " PT011" , " PT018" ]
@@ -168,22 +140,11 @@ combine-as-imports = true
168
140
[tool .mypy ]
169
141
python_version = " 3.13"
170
142
ignore_missing_imports = true
171
- show_error_codes = true
172
- strict = true
173
-
174
- # 性能优化
175
- incremental = true
176
- cache_dir = " .mypy_cache"
177
- workers = 4
178
-
179
- # 文件排除
180
- exclude = '''
181
- .*venv.*|
182
- .*__pycache__.*|
183
- .*migrations.*|
184
- .*node_modules.*|
185
- .*dist.*|
186
- .*build.*|
187
- .*templates/.*\.html
188
- '''
143
+ exclude = " .*venv.*|.*__pycache__.*|.*migrations.*"
189
144
145
+ [[tool .mypy .overrides ]]
146
+ module = [
147
+ " django.*" , " tensorflow.*" , " keras.*" ,
148
+ " matplotlib.*" , " pymongo.*"
149
+ ]
150
+ ignore_missing_imports = true
0 commit comments