From bf63d3a9dc45b67c07340f5d5f90567ac73bad15 Mon Sep 17 00:00:00 2001 From: Andrey Epifancev Date: Sat, 3 Oct 2026 18:01:48 +0400 Subject: [PATCH] =?UTF-8?q?chore:=20mypy=20=E2=80=94=20=D1=8F=D0=B2=D0=BD?= =?UTF-8?q?=D1=8B=D0=B5=20=D1=84=D0=BB=D0=B0=D0=B3=D0=B8=20strict=20=D0=B4?= =?UTF-8?q?=D0=BB=D1=8F=20models/domain=20(strict=20=D0=B2=20overrides=20?= =?UTF-8?q?=D0=B4=D0=B5=D0=B9=D1=81=D1=82=D0=B2=D1=83=D0=B5=D1=82=20=D0=B3?= =?UTF-8?q?=D0=BB=D0=BE=D0=B1=D0=B0=D0=BB=D1=8C=D0=BD=D0=BE)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Fable 5.1 --- api/pyproject.toml | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/api/pyproject.toml b/api/pyproject.toml index 45bc777..071036f 100644 --- a/api/pyproject.toml +++ b/api/pyproject.toml @@ -18,11 +18,23 @@ plugins = ["pydantic.mypy"] mypy_path = "." explicit_package_bases = true +# Строгий режим для ORM-моделей и чистого домена. `strict = true` в overrides mypy (2.x) применяет глобально, +# а не к модулю, поэтому флаги семейства strict перечислены явно. [[tool.mypy.overrides]] module = ["src.models.*", "src.domain.*"] -strict = true +disallow_any_generics = true +disallow_subclassing_any = true +disallow_untyped_calls = true +disallow_untyped_defs = true +disallow_incomplete_defs = true +disallow_untyped_decorators = true +warn_return_any = true +warn_unused_ignores = true +no_implicit_reexport = true +strict_equality = true +extra_checks = true # Сторонние пакеты без типов (или недоступные вне банка) [[tool.mypy.overrides]] -module = ["smbclient.*", "nkeys.*", "miniopy_async.*", "nats.*", "raisa_*", "pydbml.*"] +module = ["smbclient.*", "nkeys.*", "miniopy_async.*", "nats.*", "raisa_fastapi_protected_api", "raisa_fastapi_protected_api.*", "pydbml.*"] ignore_missing_imports = true