diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 8d4b16b..de507e5 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -17,7 +17,7 @@ repos: args: [--branch, main] - id: trailing-whitespace - repo: https://github.com/pre-commit/pygrep-hooks - rev: v1.9.0 # Use the ref you want to point at + rev: v1.10.0 # Use the ref you want to point at hooks: - id: python-check-blanket-noqa - id: python-check-mock-methods @@ -44,16 +44,16 @@ repos: hooks: - id: black - repo: https://github.com/asottile/blacken-docs - rev: v1.12.1 + rev: 1.13.0 hooks: - id: blacken-docs additional_dependencies: [black] - repo: https://github.com/charliermarsh/ruff-pre-commit - rev: v0.0.215 + rev: v0.0.223 hooks: - id: ruff - repo: https://github.com/dosisod/refurb - rev: v1.9.1 + rev: v1.10.0 hooks: - id: refurb args: [--ignore, FURB126] diff --git a/pyproject.toml b/pyproject.toml index 91df5d9..27c35ec 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -51,11 +51,12 @@ extend-ignore = [ "EM", # flake8-errmsg "ANN401", # flake8-annotate typing.Any "PD", # pandas-vet + "COM812", # trailing comma missing, but black takes care of that ] [tool.ruff.per-file-ignores] -"tests/*" = ["D", "ANN"] +"tests/*" = ["D", "ANN", "PLR2004"] [tool.ruff.pydocstyle] diff --git a/src/pytask_latex/collect.py b/src/pytask_latex/collect.py index be2d52f..e87c14f 100644 --- a/src/pytask_latex/collect.py +++ b/src/pytask_latex/collect.py @@ -122,7 +122,8 @@ def pytask_collect_task( ) if not ( - isinstance(script_node, FilePathNode) and script_node.value.suffix == ".tex" + isinstance(script_node, FilePathNode) + and script_node.value.suffix == ".tex" # noqa: PLR2004 ): raise ValueError( "The 'script' keyword of the @pytask.mark.latex decorator must point " diff --git a/src/pytask_latex/parametrize.py b/src/pytask_latex/parametrize.py index 6bd5266..a51a6f9 100644 --- a/src/pytask_latex/parametrize.py +++ b/src/pytask_latex/parametrize.py @@ -10,5 +10,5 @@ @hookimpl def pytask_parametrize_kwarg_to_marker(obj: Any, kwargs: dict[str, Any]) -> None: """Register kwargs as latex marker.""" - if callable(obj) and "latex" in kwargs: + if callable(obj) and "latex" in kwargs: # noqa: PLR2004 pytask.mark.latex(**kwargs.pop("latex"))(obj)