arm-tabular-parser/api/pyproject.toml
2026-10-18 19:42:12 +04:00

57 lines
2.2 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.

# Настройки инструментов качества (ruff, mypy). Зависимости — в requirements*.txt, pytest (маркеры, env) — в pytest.ini.
[tool.ruff]
line-length = 120
target-version = "py311"
[tool.ruff.lint]
select = ["E", "F", "I", "UP", "B", "PL"]
[tool.ruff.lint.isort]
known-first-party = ["src", "arm_statements"]
[tool.mypy]
python_version = "3.11"
strict = false
check_untyped_defs = true
plugins = ["pydantic.mypy"]
mypy_path = "."
explicit_package_bases = true
# Сторонние пакеты без типов (или недоступные вне банка)
[[tool.mypy.overrides]]
module = ["nkeys.*", "nats.*"]
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
# Библиотеки чтения Excel и YAML (словари `rules/*.yaml`): без типов в поставке
[[tool.mypy.overrides]]
module = ["openpyxl", "openpyxl.*", "xlrd", "xlrd.*", "pyxlsb", "pyxlsb.*", "yaml", "yaml.*"]
ignore_missing_imports = true
# Строгая типизация парсера (чистые функции над книгой Excel)
[[tool.mypy.overrides]]
module = ["src.parser", "src.parser.*"]
disallow_untyped_defs = true
# Копия общего кода (sync-statements, не править) — в строгом режиме, как в репозитории arm-statements.
# `strict = true` в overrides mypy (2.x) применяет глобально, а не к модулю, поэтому флаги семейства strict перечислены явно.
[[tool.mypy.overrides]]
module = ["arm_statements", "arm_statements.*"]
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