[project] name = "imago" version = "2.0.0" description = "Backend FastAPI pour la gestion d'images et fonctionnalités AI — Imago" requires-python = ">=3.12" license = "MIT" [tool.ruff] target-version = "py312" line-length = 120 src = ["app", "tests"] [tool.ruff.lint] select = [ "E", # pycodestyle errors "W", # pycodestyle warnings "F", # pyflakes "I", # isort "N", # pep8-naming "UP", # pyupgrade "B", # bugbear "S", # bandit (security) "T20", # flake8-print (catch stray print()) "SIM", # flake8-simplify "RUF", # ruff-specific ] ignore = [ "S101", # allow assert in tests "S104", # allow 0.0.0.0 bindings "B008", # allow Depends() in function args (FastAPI pattern) "E501", # line length handled by formatter "UP007", # keep Optional[] syntax for readability ] [tool.ruff.lint.per-file-ignores] "tests/*" = ["S101", "S106", "T20"] [tool.ruff.format] quote-style = "double" indent-style = "space" docstring-code-format = true [tool.mypy] python_version = "3.12" warn_return_any = true warn_unused_configs = true ignore_missing_imports = true check_untyped_defs = true plugins = ["pydantic.mypy"] [tool.pytest.ini_options] asyncio_mode = "auto" testpaths = ["tests"] python_files = ["test_*.py"] python_functions = ["test_*"] filterwarnings = ["ignore::DeprecationWarning"] addopts = "--tb=short -q" [tool.coverage.run] source = ["app"] omit = ["app/workers/*", "tests/*"] [tool.coverage.report] show_missing = true fail_under = 60 exclude_lines = [ "pragma: no cover", "if __name__ ==", "if TYPE_CHECKING:", ]