@@ -197,48 +197,28 @@ unsafe-fixes = false
197197[tool .ruff .lint ]
198198select = [" ALL" ]
199199extend-ignore = [
200- " ICN001" , # numpy should be np, but different convention here.
201- # Docstrings
202- " D103" , # missing docstring in public function
203- " D107" ,
204- " D203" ,
205- " D212" ,
206- " D213" ,
207- " D402" ,
208- " D413" ,
209- " D415" ,
210- " D416" ,
211- " D417" ,
200+ " COM812" , # Avoid conflicts with ruff-format
201+ " EM101" , # Exception must not use a string literal
202+ " EM102" , # Exception must not use an f-string literal
212203 " F722" , # https://docs.kidger.site/jaxtyping/faq/#flake8-or-ruff-are-throwing-an-error
213204 " FBT001" , # Boolean-typed positional argument in function definition
205+ " FIX002" , # Line contains TODO -- Use stuff from TD area.
206+ " ICN001" , # numpy should be np, but different convention here.
214207 " ISC001" , # Avoid conflicts with ruff-format
215208 " N999" , # Allow non-ASCII characters in file names.
216209 " PLC2401" , # Allow non-ASCII characters in variable names.
217210 " PLC2403" , # Allow non-ASCII function names for imports.
218211 " PLR0913" , # Allow too many arguments in function definitions.
219- " FIX002" , # Line contains TODO -- Use stuff from TD area.
220- " TRY003" , # Avoid specifying long messages outside the exception class
221212 " PLR5501" , # elif not supported by vectorization converter for Jax
222- " EM101" , # Exception must not use a string literal
223- " EM102" , # Exception must not use an f-string literal
224- # Others.
225-
226- " E731" , # do not assign a lambda expression, use a def
227- " RET" , # unnecessary elif or else statements after return, raise, continue, ...
228- " S324" , # Probable use of insecure hash function.
229- " COM812" , # trailing comma missing, but black takes care of that
230- " PT007" , # wrong type in parametrize, gave false positives
231- " DTZ001" , # use of `datetime.datetime()` without `tzinfo` argument is not allowed
232- " DTZ002" , # use of `datetime.datetime.today()` is not allowed
233- " PT012" , # `pytest.raises()` block should contain a single simple statement
234-
213+ " TRY003" , # Avoid specifying long messages outside the exception class
235214
236215 # Ignored during transition phase
237216 # ======================================
238217 " D" , # docstrings
239- " PLR2004" , # Magic values used in comparison
240218 " INP001" , # implicit namespace packages without init.
219+ " PLR2004" , # Magic values used in comparison
241220 " PT006" , # Allows only lists of tuples in parametrize, even if single argument
221+ " PT007" , # wrong type in parametrize
242222 " S101" , # use of asserts outside of tests
243223
244224]
@@ -248,17 +228,17 @@ exclude = []
248228"conftest.py" = [" ANN" ]
249229"docs/**/*.ipynb" = [" T201" ]
250230# Mostly things vectorization can't handle
251- "src/_gettsim/*" = [" E501" , " PLR1714" , " PLR1716" , " E721" , " SIM108" ]
231+ "src/_gettsim/*" = [" E501" , " PLR1714" , " PLR1716" , " E721" , " SIM108" , " RET " ]
252232# All tests return None and use asserts
253233"src/_gettsim_tests/**/*.py" = [" ANN" , " S101" ]
254234"src/ttsim/interface_dag_elements/specialized_environment.py" = [" E501" ]
255235"src/ttsim/interface_dag_elements/fail_if.py" = [" E501" ]
256236"src/ttsim/interface_dag_elements/typing.py" = [" PGH" , " PLR" , " SIM114" ]
257237# Mostly things vectorization can't handle
258- "tests/ttsim/mettsim/**/*.py" = [" PLR1714" , " PLR1716" , " E721" , " SIM108" ]
238+ "tests/ttsim/mettsim/**/*.py" = [" PLR1714" , " PLR1716" , " E721" , " SIM108" , " RET" ]
239+ "tests/ttsim/tt_dag_elements/test_vectorization.py" = [" PLR1714" , " PLR1716" , " E721" , " SIM108" , " RET" ]
259240# All tests return None and use asserts
260241"tests/ttsim/**/*.py" = [" ANN" , " S101" ]
261- "tests/ttsim/tt_dag_elements/test_vectorization.py" = [" PLR1714" , " PLR1716" , " E721" , " SIM108" ]
262242"tests/ttsim/test_failures.py" = [" E501" ]
263243# TODO: remove once ported nicely
264244"src/ttsim/stale_code_storage.py" = [" ALL" ]
@@ -298,20 +278,12 @@ disallow_untyped_defs = false
298278ignore_errors = true
299279
300280[[tool .mypy .overrides ]]
301- module = [
302- " tests.*" ,
303- ]
304- disable_error_code = [
305- " no-untyped-def" , # All tests return None, don't clutter source code.
306- ]
281+ module = [" tests.*" ,]
282+ disable_error_code = [" no-untyped-def" ] # All tests return None, don't clutter source code.
307283
308284[[tool .mypy .overrides ]]
309- module = [
310- " src._gettsim_tests.*" ,
311- ]
312- disable_error_code = [
313- " no-untyped-def" , # All tests return None, don't clutter source code.
314- ]
285+ module = [" src._gettsim_tests.*" ,]
286+ disable_error_code = [" no-untyped-def" ] # All tests return None, don't clutter source code.
315287
316288[tool .check-manifest ]
317289ignore = [" src/_gettsim/_version.py" ]
0 commit comments