diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 313fa51c..bb06c1da 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -3,10 +3,6 @@ repos: rev: 5.13.2 hooks: - id: isort - - repo: https://github.com/asottile/yesqa - rev: v1.5.0 - hooks: - - id: yesqa - repo: https://github.com/asottile/pyupgrade rev: v3.15.2 hooks: @@ -16,10 +12,10 @@ repos: rev: 24.4.2 hooks: - id: black - - repo: https://github.com/pycqa/flake8 - rev: 7.0.0 + - repo: https://github.com/astral-sh/ruff-pre-commit + rev: v0.5.1 hooks: - - id: flake8 + - id: ruff - repo: https://github.com/pre-commit/pre-commit-hooks rev: v4.6.0 hooks: diff --git a/grizzly/replay/replay.py b/grizzly/replay/replay.py index dba150c3..6cbb9d51 100644 --- a/grizzly/replay/replay.py +++ b/grizzly/replay/replay.py @@ -196,7 +196,7 @@ def load_testcases( tests.append( TestCase.load(entry, catalog=catalog, entry_point=entry_point) ) - except TestCaseLoadFailure as exc: + except TestCaseLoadFailure as exc: # noqa: PERF203 LOG.warning("Failed to load: '%s' (%s)", entry, exc) if not tests: raise TestCaseLoadFailure("Failed to load TestCases") diff --git a/pyproject.toml b/pyproject.toml index 4ed985a3..4f5a48f0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -63,4 +63,20 @@ filterwarnings = [ ] log_level = "DEBUG" +[tool.ruff.lint] +select = [ + # pycodestyle + "E", + # Pyflakes + "F", + # Flynt + "FLY", + # Perflint + "PERF", + # Ruff-specific rules + "RUF", + # pycodestyle + "W", +] + [tool.setuptools_scm] diff --git a/sapphire/test_sapphire.py b/sapphire/test_sapphire.py index 72d378ab..1d52484f 100644 --- a/sapphire/test_sapphire.py +++ b/sapphire/test_sapphire.py @@ -309,7 +309,7 @@ def test_sapphire_12(client, tmp_path): # non-alphanumeric chars (valid characters to use on filesystem) ("!@$%^&(_+-=[]),'~`{}", None), # extended ascii chars - ("€d’é-ñÿ", None), + ("€d’é-ñÿ", None), # noqa: RUF001 ], ) def test_sapphire_13(client, tmp_path, path, query): @@ -667,7 +667,7 @@ def _test_callback(): # non-alphanumeric chars (valid characters to use on filesystem) "!@$%^&(_+-=[]),'~`{}", # extended ascii chars - "€d’é-ñÿ", + "€d’é-ñÿ", # noqa: RUF001 ], ) def test_sapphire_25(client, tmp_path, file_name):