diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index de248719..936d6c53 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -25,15 +25,11 @@ repos: - id: isort files: \.py$ - - repo: https://github.com/asottile/yesqa - rev: v1.5.0 + - repo: https://github.com/astral-sh/ruff-pre-commit + rev: v0.0.284 hooks: - - id: yesqa - - - repo: https://github.com/PyCQA/flake8 - rev: 6.1.0 - hooks: - - id: flake8 + - id: ruff + args: [--fix, --exit-non-zero-on-fix] - repo: https://github.com/econchick/interrogate rev: 1.5.0 diff --git a/pyproject.toml b/pyproject.toml index bdb3a546..e022f796 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -62,8 +62,7 @@ dev = ["attrs[tests]", "pre-commit"] [project.urls] Documentation = "https://www.attrs.org/" Changelog = "https://www.attrs.org/en/stable/changelog.html" -"Bug Tracker" = "https://github.com/python-attrs/attrs/issues" -"Source Code" = "https://github.com/python-attrs/attrs" +GitHub = "https://github.com/python-attrs/attrs" Funding = "https://github.com/sponsors/hynek" Tidelift = "https://tidelift.com/subscription/pkg/pypi-attrs?utm_source=pypi-attrs&utm_medium=pypi" @@ -157,6 +156,15 @@ whitelist-regex = ["test_.*"] toplevel = ["attr", "attrs"] +[tool.ruff] +src = ["src", "tests", "conftest.py", "docs"] + +[tool.ruff.per-file-ignores] +"tests/typing_example.py" = [ + "E741", # ambiguous variable names don't matter in type checks +] + + [tool.towncrier] name = "attrs" directory = "changelog.d"