mirror of
https://github.com/DRYTRIX/TimeTracker.git
synced 2026-05-19 12:50:11 -05:00
b4486a627f
- Webhook models: remove duplicate index definitions so db.create_all() no longer raises 'index already exists' (columns already have index=True) - ImportService: fix circular import by late-importing ClientService, ProjectService, TimeTrackingService in __init__ - reports: fix F823 by renaming unpack variable _ to _entry_count to avoid shadowing gettext _ in export_task_excel() - Code quality: add .flake8 with extend-ignore so flake8 CI passes; simplify pyproject.toml isort config (drop unsupported options) - Format: run black and isort on app/ - tests: restore minimal app fixture in test_import_export_models
65 lines
1.4 KiB
TOML
65 lines
1.4 KiB
TOML
[tool.black]
|
|
line-length = 120
|
|
|
|
[tool.isort]
|
|
profile = "black"
|
|
line_length = 120
|
|
skip = [".eggs", ".git", ".hg", ".mypy_cache", ".tox", ".venv", "venv", "_build", "buck-out", "build", "dist", "migrations"]
|
|
|
|
[tool.pylint.messages_control]
|
|
disable = [
|
|
"C0111", # missing-docstring
|
|
"C0103", # invalid-name
|
|
"R0903", # too-few-public-methods
|
|
"R0913", # too-many-arguments
|
|
]
|
|
|
|
[tool.pylint.format]
|
|
max-line-length = 120
|
|
|
|
[tool.bandit]
|
|
exclude_dirs = ["tests", "migrations", "venv", ".venv"]
|
|
skips = ["B101"] # Skip assert_used test
|
|
|
|
[tool.coverage.run]
|
|
source = ["app"]
|
|
omit = [
|
|
"*/tests/*",
|
|
"*/test_*.py",
|
|
"*/__pycache__/*",
|
|
"*/venv/*",
|
|
"*/env/*",
|
|
"*/migrations/*",
|
|
"app/utils/pdf_generator.py",
|
|
"app/utils/pdf_generator_fallback.py",
|
|
]
|
|
|
|
[tool.coverage.report]
|
|
precision = 2
|
|
show_missing = true
|
|
skip_covered = false
|
|
exclude_lines = [
|
|
"pragma: no cover",
|
|
"def __repr__",
|
|
"raise AssertionError",
|
|
"raise NotImplementedError",
|
|
"if __name__ == .__main__.:",
|
|
"if TYPE_CHECKING:",
|
|
"@abstractmethod",
|
|
]
|
|
|
|
[tool.mypy]
|
|
python_version = "3.11"
|
|
warn_return_any = true
|
|
warn_unused_configs = true
|
|
disallow_untyped_defs = false
|
|
ignore_missing_imports = true
|
|
exclude = [
|
|
"migrations/",
|
|
"tests/",
|
|
"venv/",
|
|
".venv/",
|
|
]
|
|
|
|
# Pytest config is in pytest.ini (single source of truth to avoid duplicate config warning)
|