diff --git a/noxfile.py b/noxfile.py index 7689eec..e997850 100644 --- a/noxfile.py +++ b/noxfile.py @@ -44,8 +44,8 @@ def lint(session: nox.Session): @nox.session def static(session: nox.Session): - install(session, "ruff", "reuse", "yamllint") - session.run("ruff", *session.posargs, *PY_FILES) + install(session, "ruff >= 0.2.0", "reuse", "yamllint") + session.run("ruff", "check", *session.posargs, *PY_FILES) session.run("yamllint", *YAML_FILES) session.run("reuse", "lint") diff --git a/ruff.toml b/ruff.toml index f0becf9..432a15c 100644 --- a/ruff.toml +++ b/ruff.toml @@ -1,12 +1,17 @@ -# Copyright (C) 2023 Maxwell G +# Copyright (C) 2024 Maxwell G # SPDX-License-Identifier: GPL-1.0-or-later + +[lint] select = [ "A", # flake8-builtins "ARG", # unused-arguments "B", # flake8-bugbear + "DTZ", # flake8-datetimez "E", # pycodestyle errors "F", # pyflakes + "PERF", # Perflint "PL", # pylint + "RUF", # Ruff's own rules "SIM", # flake8-simplify "W", # pycodestyle warnings ] @@ -27,5 +32,5 @@ ignore = [ "PLR0913", ] -[extend-per-file-ignores] +[lint.extend-per-file-ignores] "tests/*" = ["ARG"] diff --git a/tests/test_vectors.py b/tests/test_vectors.py index d4fc4b6..50cc1e2 100644 --- a/tests/test_vectors.py +++ b/tests/test_vectors.py @@ -19,7 +19,7 @@ SENTINEL = "*-*" * 20 @dataclasses.dataclass() class _TestVector: # Test id - id: str # noqa: A003 + id: str # Longer description description: str | None = None # Macros to %define