arm-core/api/pyproject.toml
Andrey Epifancev ed5ed43fa6 feat: миграция 0001_dbml_v5_13 — полный DDL DBML v5.13 с откатом; тесты цикла и make migration-cycle
Явный DDL без импорта src.models: схема dkb, 27 enum-типов (явный CREATE/DROP TYPE), 43 таблицы с индексами
(partial unique, NULLS NOT DISTINCT), FK цикла stored_file -> recognition_job отдельным шагом; downgrade —
FK цикла, таблицы в обратном порядке, типы. Тесты (integration, scratch-БД, alembic подпроцессом):
upgrade -> downgrade -> upgrade, пустой compare_metadata и alembic check, каталог = create_all ORM,
поведение partial unique/NULLS NOT DISTINCT/FK-цикла; офлайн-SQL — CREATE SCHEMA первым.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-03 20:27:23 +04:00

51 lines
1.9 KiB
TOML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Настройки инструментов качества. Зависимости — в requirements*.txt, pytest — в pytest.ini.
[tool.ruff]
line-length = 120
target-version = "py311"
[tool.ruff.lint]
select = ["E", "F", "I", "UP", "B", "PL"]
# Ревизии alembic — линейный DDL: одна функция upgrade() на десятки create_table/create_index
[tool.ruff.lint.per-file-ignores]
"alembic/versions/*" = ["PLR0915"]
[tool.ruff.lint.isort]
known-first-party = ["src", "scripts"]
[tool.mypy]
python_version = "3.11"
strict = false
check_untyped_defs = true
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.*"]
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.*", "nats.*", "raisa_fastapi_protected_api", "raisa_fastapi_protected_api.*", "pydbml.*"]
ignore_missing_imports = true
# miniopy_async: пакет типизирован с ошибкой (Minio не виден mypy при реэкспорте) — типы не подтягиваем, Minio = Any
[[tool.mypy.overrides]]
module = ["miniopy_async", "miniopy_async.*"]
follow_imports = "skip"
ignore_missing_imports = true