diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index c2b0504..056f92b 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -9,13 +9,13 @@ repos: - id: black-jupyter - repo: https://github.com/asottile/blacken-docs - rev: 1.13.0 + rev: 1.14.0 hooks: - id: blacken-docs - additional_dependencies: [black==23.1.0] + additional_dependencies: [black==23.3.0] - - repo: https://github.com/charliermarsh/ruff-pre-commit - rev: "v0.0.270" + - repo: https://github.com/astral-sh/ruff-pre-commit + rev: "v0.0.276" hooks: - id: ruff args: ["--fix", "--show-fixes"] @@ -48,7 +48,7 @@ repos: - id: rst-inline-touching-normal - repo: https://github.com/pre-commit/mirrors-mypy - rev: v1.3.0 + rev: v1.4.1 hooks: - id: mypy files: (src|web|tests) @@ -62,13 +62,13 @@ repos: - types-PyYAML - repo: https://github.com/codespell-project/codespell - rev: v2.2.4 + rev: v2.2.5 hooks: - id: codespell args: ["-Lhist,absense"] - repo: https://github.com/shellcheck-py/shellcheck-py - rev: v0.9.0.2 + rev: v0.9.0.5 hooks: - id: shellcheck diff --git a/pyproject.toml b/pyproject.toml index 7caf10e..1566e29 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -182,3 +182,6 @@ flake8-unused-arguments.ignore-variadic-names = true [tool.ruff.per-file-ignores] "src/repo_review/_compat/**.py" = ["TID251"] "src/**/__main__.py" = ["T20"] + +[tool.repo-review] +ignore = ["PC190"] # Remove after first July 2023 release of sp-repo-review diff --git a/src/repo_review/processor.py b/src/repo_review/processor.py index 646e6d4..10b8557 100644 --- a/src/repo_review/processor.py +++ b/src/repo_review/processor.py @@ -193,7 +193,7 @@ def process( # Run all the checks in topological order based on their dependencies ts = graphlib.TopologicalSorter(graph) for name in ts.static_order(): - if all(completed.get(n, "") == "" for n in graph[name]): # noqa: PLC1901 + if all(completed.get(n, "") == "" for n in graph[name]): result = apply_fixtures(fixtures, tasks[name].check) if isinstance(result, bool): completed[name] = "" if result else tasks[name].check.__doc__ diff --git a/tests/test_fixtures.py b/tests/test_fixtures.py index a0dd215..9e89e7b 100644 --- a/tests/test_fixtures.py +++ b/tests/test_fixtures.py @@ -77,7 +77,7 @@ def test_process_fixtures_with_package() -> None: assert apply_fixtures(fixtures, nothing) == 42 assert apply_fixtures(fixtures, simple) == "." - assert apply_fixtures(fixtures, lambda package: package) == Path(".") # type: ignore[no-any-return] + assert apply_fixtures(fixtures, lambda package: package) == Path(".") assert apply_fixtures(fixtures, not_simple) == ". ." diff --git a/tests/test_utilities/pyproject.py b/tests/test_utilities/pyproject.py index 94cc70c..75544ce 100644 --- a/tests/test_utilities/pyproject.py +++ b/tests/test_utilities/pyproject.py @@ -70,7 +70,7 @@ class PyProject: class PP002(PyProject): "Has a proper build-system table" - requires = {"PY001"} + requires = frozenset(("PY001",)) url = "https://packaging.python.org/en/latest/specifications/declaring-build-dependencies" @staticmethod @@ -90,7 +90,7 @@ def check(pyproject: dict[str, Any]) -> bool: class PP003(PyProject): "Does not list wheel as a build-dep" - requires = {"PY001"} + requires = frozenset(("PY001",)) @staticmethod def check(pyproject: dict[str, Any]) -> bool: @@ -110,7 +110,7 @@ def check(pyproject: dict[str, Any]) -> bool: class PP301(PyProject): "Has pytest in pyproject" - requires = {"PY001"} + requires = frozenset(("PY001",)) @staticmethod def check(pyproject: dict[str, Any]) -> bool: @@ -129,7 +129,7 @@ def check(pyproject: dict[str, Any]) -> bool: class PP302(PyProject): "Sets a minimum pytest to at least 6" - requires = {"PP301"} + requires = frozenset(("PP301",)) @staticmethod def check(pyproject: dict[str, Any]) -> bool: