diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..ac499a1 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,7 @@ +repos: + - repo: https://github.com/astral-sh/ruff-pre-commit + rev: v0.11.0 + hooks: + - id: ruff + args: [--fix] + - id: ruff-format diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..2ddb9e0 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,46 @@ +[project] +name = "bsn-livesystem" +version = "0.1.0" +requires-python = ">=3.13" +dependencies = [ + "flask", + "pydantic", + "redis", + "structlog", + "pytest", + "pytest-cov", + "mypy", +] + +[tool.ruff] +line-length = 100 +target-version = "py313" + +[tool.ruff.lint] +select = ["E", "F", "I", "N", "W", "UP", "PL", "C90", "S"] +ignore = [] + +[tool.ruff.lint.per-file-ignores] +"tests/**/*.py" = ["S101", "PLR2004"] + +[tool.ruff.format] +quote-style = "double" +indent-style = "space" +docstring-code-format = true + +[tool.mypy] +strict = true +python_version = "3.13" +explicit_package_bases = true + +[[tool.mypy.overrides]] +module = "pytest" +ignore_missing_imports = true + +[[tool.mypy.overrides]] +module = "fakeredis" +ignore_missing_imports = true + +[tool.pytest.ini_options] +testpaths = ["tests"] +addopts = "-v --tb=short"