@@ -226,6 +226,8 @@ wrap-summaries = 79
226226
227227[tool .mypy ]
228228check_untyped_defs = true
229+ disallow_incomplete_defs = true
230+ disallow_untyped_defs = true
229231no_implicit_optional = true
230232show_error_codes = true
231233warn_redundant_casts = true
@@ -234,11 +236,6 @@ warn_unused_ignores = true
234236plugins = [" mypypp.deprecated" ]
235237python_version = " 3.10"
236238
237- [[tool .mypy .overrides ]]
238- module = [" tests.*" ]
239- disallow_incomplete_defs = false
240- disallow_untyped_defs = false
241-
242239[[tool .mypy .overrides ]]
243240# Untyped third party libraries
244241module = [
@@ -269,32 +266,43 @@ line-length = 79
269266[tool .ruff .lint ]
270267extend-select = [
271268 " ARG" , # flake8-unused-arguments
269+ " ASYNC" , # flake8-async
272270 " B" , # flake8-bugbear
271+ " BLE" , # flake8-blind-except
273272 " C4" , # flake8-comprehensions
274273 " D" , # pydocstyle
275274 " D212" , # "Multi-line docstring summary should start at the first line"
276275 " D402" , # "First line should not be the function’s 'signature'"
277276 " D417" , # "Missing argument descriptions in the docstring"
278277 " DTZ" , # flake8-datetimez
278+ " E" , # pycodestyle
279279 " ERA" , # eradicate
280+ " F" , # pyflakes
280281 " FA" , # flake8-future-annotations
281282 " FIX" , # flake8-fixme
283+ " FLY" , # flynt
282284 " FURB" , # refurb
283285 " G" , # flake8-logging-format
284286 " I" , # isort
285287 " ICN" , # flake8-import-conventions
286288 " ISC001" , # "Implicitly concatenated string literals on one line"
287289 " ISC003" , # "Explicitly concatenated string should be implicitly concatenated"
288290 " LOG" , # flake8-logging
291+ " PERF" , # perflint
292+ " PGH" , # pygrep-hooks
289293 " PIE" , # flake8-pie
290294 " PL" , # pylint
291295 " PT" , # flake8-pytest-style
296+ " PYI" , # flake8-pyi
292297 " RET" , # flake8-return
293298 " RUF" , # ruff
294299 " SIM" , # flake8-simplify
295- " TC005" , # "Found empty type-checking block"
296- " T1" , # flake8-debugger
300+ " SLOT" , # flake8-slots
301+ " T10" , # flake8-debugger
302+ " T20" , # flake8-print
303+ " TC" , # flake8-type-checking
297304 " UP" , # pyupgrade
305+ " W" , # pycodestyle
298306 " YTT" , # flake8-2020
299307]
300308ignore = [
@@ -308,6 +316,7 @@ ignore = [
308316 " DTZ001" , # `tzinfo=None` passed to `datetime.datetime()`
309317 " DTZ005" , # `tz=None` passed to `datetime.datetime.now()`
310318 " E402" , # Module level import not at top of file
319+ " E501" , # Line too long # auto-formatting
311320 " F403" , # `from _ import *` used; unable to detect undefined names
312321 " F405" , # `_` may be undefined, or defined from star imports
313322 " PLC0414" , # Import alias does not rename original package # used for explicit reexports
@@ -324,6 +333,9 @@ ignore = [
324333 " PLW2901" , # `for` loop variable `_` overwritten by assignment target
325334 " RUF005" , # Consider iterable unpacking instead of concatenation # false-positives with NamedTuple and overridden __add__ (i.e. Vector2D)
326335 " SIM108" , # Use ternary operator instead of `if`-`else`-block
336+ " TC001" , # Move first-party import into type-checking block # Sphinx needs all imports at runtime
337+ " TC002" , # Move third-party import into type-checking block # Sphinx needs all imports at runtime
338+ " TC003" , # Move stdlib import into type-checking block # Sphinx needs all imports at runtime
327339]
328340
329341[tool .ruff .lint .extend-per-file-ignores ]
@@ -332,13 +344,24 @@ ignore = [
332344]
333345"tests/test_*.py" = [
334346 " F811" , # Redefinition of unused `_` from line _
347+ " PGH003" , # Use specific rule codes when ignoring type issues
335348 " PLR2004" , # Magic value used in comparison, consider replacing `_` with a constant variable
336349]
337350
338- # Jupyter notebooks
351+ # Jupyter notebooks and CLI scripts
339352"*.ipynb" = [
340353 " ERA001" , # commented-out code # used to showcase alternatives to the executed code
341354 " FIX" , # flake8-fixme
355+ " T201" , # print used
356+ ]
357+ "src/capellambse/_diagram_cache.py" = [
358+ " T201" , # print used
359+ ]
360+ "src/capellambse/_scripts/*.py" = [
361+ " T201" , # print used
362+ ]
363+ "scripts/*.py" = [
364+ " T201" , # print used
342365]
343366
344367[tool .ruff .lint .flake8-bugbear ]
0 commit comments