diff --git a/python/{{cookiecutter.project_slug}}/.pre-commit-config.yaml b/python/{{cookiecutter.project_slug}}/.pre-commit-config.yaml index 377623e..dd19de5 100644 --- a/python/{{cookiecutter.project_slug}}/.pre-commit-config.yaml +++ b/python/{{cookiecutter.project_slug}}/.pre-commit-config.yaml @@ -7,7 +7,7 @@ repos: - id: trailing-whitespace - id: end-of-file-fixer - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.1.15 + rev: v0.2.0 hooks: - id: ruff-format - id: ruff diff --git a/python/{{cookiecutter.project_slug}}/pyproject.toml b/python/{{cookiecutter.project_slug}}/pyproject.toml index 7a0954c..5eafe35 100644 --- a/python/{{cookiecutter.project_slug}}/pyproject.toml +++ b/python/{{cookiecutter.project_slug}}/pyproject.toml @@ -25,7 +25,7 @@ dynamic = ["version"] [project.optional-dependencies] tests = ["pytest", "pytest-cov"] -dev = ["pre-commit", "ruff==0.1.15"] +dev = ["pre-commit", "ruff==0.2.0"] {% if cookiecutter.add_docs %} docs = [ "sphinx==6.1.3", @@ -64,6 +64,8 @@ branch = true [tool.ruff] src = ["src"] + +[tool.ruff.lint] {% if cookiecutter.add_docs %}exclude = ["docs/source/conf.py"]{% endif %} select = [ "F", # https://docs.astral.sh/ruff/rules/#pyflakes-f @@ -108,8 +110,6 @@ fixable = [ "SIM", "RUF" ] - -# ANN101 - missing-type-self # ANN003 - missing-type-kwargs # D203 - one-blank-line-before-class # D205 - blank-line-after-summary @@ -126,17 +126,16 @@ fixable = [ # S321 - suspicious-ftp-lib-usage # *ignored for compatibility with formatter ignore = [ - "ANN101", "ANN003", + "ANN003", "D203", "D205", "D206", "D213", "D300", "D400", "D415", "E111", "E114", "E117", "E501", "W191", "S321", ] -[tool.ruff.per-file-ignores] +[tool.ruff.lint.per-file-ignores] # ANN001 - missing-type-function-argument -# ANN102 - missing-type-cls # ANN2 - missing-return-type # S101 - assert # B011 - assert-false -"tests/*" = ["ANN001", "ANN102", "ANN2", "S101", "B011"] +"tests/*" = ["ANN001", "ANN2", "S101", "B011"]