diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..96dae98 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,31 @@ +repos: + - repo: https://github.com/astral-sh/ruff-pre-commit + rev: v0.11.0 + hooks: + - id: ruff + args: [--fix] + - id: ruff-format + + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v5.0.0 + hooks: + - id: trailing-whitespace + - id: end-of-file-fixer + - id: check-yaml + args: [--unsafe] + - id: check-json + - id: check-toml + - id: check-added-large-files + args: ['--maxkb=500'] + - id: detect-private-key + - id: debug-statements + + - repo: https://github.com/pre-commit/mirrors-mypy + rev: v1.15.0 + hooks: + - id: mypy + args: [--ignore-missing-imports, --no-strict-optional] + files: ^src/ + additional_dependencies: + - types-pyyaml + - types-requests diff --git a/pyproject.toml b/pyproject.toml index 0b132de..d814990 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -41,6 +41,11 @@ index-strategy = "unsafe-best-match" line-length = 100 target-version = "py313" +[tool.ruff.format] +quote-style = "double" +indent-style = "space" +skip-magic-trailing-comma = false + [tool.ruff.lint] select = ["E", "F", "I", "N", "W"]