- requirements: openpyxl==3.1.5, pyxlsb==1.0.10, xlrd==2.0.2, et_xmlfile==2.0.0 (транзитивная) - tests/fixtures_helpers.py, conftest: фикстура fixtures_dir, параметризация osv_file/synthetic_file, skip маркера fixtures - pyproject: mypy ignore_missing_imports для openpyxl/xlrd/pyxlsb, disallow_untyped_defs для src.parser.* Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012vJkmBGKKqMoEMzvsXG3y2
41 lines
1.4 KiB
TOML
41 lines
1.4 KiB
TOML
# Настройки инструментов качества (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"]
|
||
|
||
[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: без типов в поставке
|
||
[[tool.mypy.overrides]]
|
||
module = ["openpyxl", "openpyxl.*", "xlrd", "xlrd.*", "pyxlsb", "pyxlsb.*"]
|
||
ignore_missing_imports = true
|
||
|
||
# Строгая типизация парсера (чистые функции над книгой Excel)
|
||
[[tool.mypy.overrides]]
|
||
module = ["src.parser", "src.parser.*"]
|
||
disallow_untyped_defs = true
|