diff --git a/.gitignore b/.gitignore index 6437f86..d9217fb 100644 --- a/.gitignore +++ b/.gitignore @@ -17,6 +17,7 @@ venv/ .mypy_cache/ .tox test-reports/ +.cache # Sphinx docs/_build/ diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index f22ac2d..5ab637e 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -27,3 +27,9 @@ repos: rev: v1.47.2 hooks: - id: typos + - repo: https://github.com/alessio-locatelli/ruff-extra-rules + rev: v0.2.2 + hooks: + - id: ruff-extra-rules + - id: ruff-extra-rules-ty + additional_dependencies: [ty] diff --git a/pyproject.toml b/pyproject.toml index d74f674..5f05e9f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -147,5 +147,15 @@ known-first-party = ['test'] [tool.ruff.lint.pycodestyle] max-line-length = 120 +[tool.ruff-extra-rules] +fix = true + +[tool.ruff-extra-rules.per-file-ignores] +# Keeping the library interface (regardless of whether it is a public or +# private function) is more important than renaming a function for a negligible +# clarity improvement. However, this can be done in the next major release. +"aiohttp_client_cache/*" = ["validate-function-name"] +"examples/*" = ["validate-function-name"] + [tool.typos] files.extend-exclude = ["CONTRIBUTORS.md"]