diff --git a/pyproject.toml b/pyproject.toml index 7f97806ea..d6abb0eee 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -129,10 +129,8 @@ extend-select = [ "W", # pycodestyle warning ] extend-ignore = [ - "E501", - "E731", - # Remove ISC001 when https://github.com/astral-sh/ruff/issues/8272 is resolved. - "ISC001", + "A005", # ignore stdlib-module-shadowing. Would need to re-name services.logging. + "E501", # ignore line-length. We judge case-by-case. ] [tool.ruff.lint.per-file-ignores] diff --git a/requirements.dev.txt b/requirements.dev.txt index f7031552a..ada798ff9 100644 --- a/requirements.dev.txt +++ b/requirements.dev.txt @@ -403,25 +403,25 @@ responses==0.25.6 \ --hash=sha256:9cac8f21e1193bb150ec557875377e41ed56248aed94e4567ed644db564bacf1 \ --hash=sha256:eae7ce61a9603004e76c05691e7c389e59652d91e94b419623c12bbfb8e331d8 # via -r requirements.dev.in -ruff==0.8.6 \ - --hash=sha256:0509e8da430228236a18a677fcdb0c1f102dd26d5520f71f79b094963322ed25 \ - --hash=sha256:0c000a471d519b3e6cfc9c6680025d923b4ca140ce3e4612d1a2ef58e11f11fe \ - --hash=sha256:248b1fb3f739d01d528cc50b35ee9c4812aa58cc5935998e776bf8ed5b251e75 \ - --hash=sha256:45a56f61b24682f6f6709636949ae8cc82ae229d8d773b4c76c09ec83964a95a \ - --hash=sha256:496dd38a53aa173481a7d8866bcd6451bd934d06976a2505028a50583e001b76 \ - --hash=sha256:52d587092ab8df308635762386f45f4638badb0866355b2b86760f6d3c076188 \ - --hash=sha256:54799ca3d67ae5e0b7a7ac234baa657a9c1784b48ec954a094da7c206e0365b1 \ - --hash=sha256:61323159cf21bc3897674e5adb27cd9e7700bab6b84de40d7be28c3d46dc67cf \ - --hash=sha256:7ae4478b1471fc0c44ed52a6fb787e641a2ac58b1c1f91763bafbc2faddc5117 \ - --hash=sha256:7d7fc2377a04b6e04ffe588caad613d0c460eb2ecba4c0ccbbfe2bc973cbc162 \ - --hash=sha256:91a7ddb221779871cf226100e677b5ea38c2d54e9e2c8ed847450ebbdf99b32d \ - --hash=sha256:9257aa841e9e8d9b727423086f0fa9a86b6b420fbf4bf9e1465d1250ce8e4d8d \ - --hash=sha256:bc3c083c50390cf69e7e1b5a5a7303898966be973664ec0c4a4acea82c1d4315 \ - --hash=sha256:dcad24b81b62650b0eb8814f576fc65cfee8674772a6e24c9b747911801eeaa5 \ - --hash=sha256:defed167955d42c68b407e8f2e6f56ba52520e790aba4ca707a9c88619e580e3 \ - --hash=sha256:e169ea1b9eae61c99b257dc83b9ee6c76f89042752cb2d83486a7d6e48e8f764 \ - --hash=sha256:e88b8f6d901477c41559ba540beeb5a671e14cd29ebd5683903572f4b40a9807 \ - --hash=sha256:f1d70bef3d16fdc897ee290d7d20da3cbe4e26349f62e8a0274e7a3f4ce7a905 +ruff==0.9.2 \ + --hash=sha256:1a605fdcf6e8b2d39f9436d343d1f0ff70c365a1e681546de0104bef81ce88df \ + --hash=sha256:3292c5a22ea9a5f9a185e2d131dc7f98f8534a32fb6d2ee7b9944569239c648d \ + --hash=sha256:492a5e44ad9b22a0ea98cf72e40305cbdaf27fac0d927f8bc9e1df316dcc96eb \ + --hash=sha256:71cbe22e178c5da20e1514e1e01029c73dc09288a8028a5d3446e6bba87a5145 \ + --hash=sha256:80605a039ba1454d002b32139e4970becf84b5fee3a3c3bf1c2af6f61a784347 \ + --hash=sha256:82b35259b0cbf8daa22a498018e300b9bb0174c2bbb7bcba593935158a78054d \ + --hash=sha256:8b6a9701d1e371bf41dca22015c3f89769da7576884d2add7317ec1ec8cb9c3c \ + --hash=sha256:8efd9da7a1ee314b910da155ca7e8953094a7c10d0c0a39bfde3fcfd2a015684 \ + --hash=sha256:9cc53e68b3c5ae41e8faf83a3b89f4a5d7b2cb666dff4b366bb86ed2a85b481f \ + --hash=sha256:a1b63fa24149918f8b37cef2ee6fff81f24f0d74b6f0bdc37bc3e1f2143e41c6 \ + --hash=sha256:af1e9e9fe7b1f767264d26b1075ac4ad831c7db976911fa362d09b2d0356426a \ + --hash=sha256:b338edc4610142355ccf6b87bd356729b62bf1bc152a2fad5b0c7dc04af77bfe \ + --hash=sha256:b5eceb334d55fae5f316f783437392642ae18e16dcf4f1858d55d3c2a0f8f5d0 \ + --hash=sha256:b9aab82bb20afd5f596527045c01e6ae25a718ff1784cb92947bff1f83068b00 \ + --hash=sha256:c547f7f256aa366834829a08375c297fa63386cbe5f1459efaf174086b564247 \ + --hash=sha256:c5e1d6abc798419cf46eed03f54f2e0c3adb1ad4b801119dedf23fcaf69b55b5 \ + --hash=sha256:d18bba3d3353ed916e882521bc3e0af403949dbada344c20c16ea78f47af965e \ + --hash=sha256:fbd337bac1cfa96be615f6efcd4bc4d077edbc127ef30e2b8ba2a27e18c054d4 # via -r requirements.dev.in six==1.16.0 \ --hash=sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926 \ diff --git a/tests/unit/jobserver/models/test_mutability.py b/tests/unit/jobserver/models/test_mutability.py index c3e677f55..5b10c8570 100644 --- a/tests/unit/jobserver/models/test_mutability.py +++ b/tests/unit/jobserver/models/test_mutability.py @@ -73,15 +73,15 @@ def test_all_models_are_listed(): - assert set(MUTABLE_MODELS) | set(IMMUTABLE_MODELS) == set( - get_models() - ), "The lists of mutable and immutable models are incomplete" + assert set(MUTABLE_MODELS) | set(IMMUTABLE_MODELS) == set(get_models()), ( + "The lists of mutable and immutable models are incomplete" + ) def test_all_models_are_listed_as_either_mutable_or_immutable(): - assert ( - set(MUTABLE_MODELS) & set(IMMUTABLE_MODELS) == set() - ), "A model must be listed as either mutable or immutable" + assert set(MUTABLE_MODELS) & set(IMMUTABLE_MODELS) == set(), ( + "A model must be listed as either mutable or immutable" + ) @pytest.mark.parametrize("Model", MUTABLE_MODELS) diff --git a/tests/unit/jobserver/models/test_paired_fields.py b/tests/unit/jobserver/models/test_paired_fields.py index 41097bd60..308026224 100644 --- a/tests/unit/jobserver/models/test_paired_fields.py +++ b/tests/unit/jobserver/models/test_paired_fields.py @@ -72,9 +72,9 @@ def get_stems(suffix): unpaired_rnames = [f"{stem}{rsuffix}" for stem in rstems - lstems] unpaired_names = sorted(unpaired_lnames + unpaired_rnames) - assert ( - not unpaired_names - ), f"{model._meta.label} is missing paired fields for: {', '.join(unpaired_names)}" + assert not unpaired_names, ( + f"{model._meta.label} is missing paired fields for: {', '.join(unpaired_names)}" + ) @pytest.mark.slow_test diff --git a/tests/verification/test_github.py b/tests/verification/test_github.py index caf8e6583..c7320f38f 100644 --- a/tests/verification/test_github.py +++ b/tests/verification/test_github.py @@ -50,9 +50,9 @@ class TestFakeGitHubAPIWithErrors: def test_public_methods_raise_githuberror(self): fake = FakeGitHubAPIWithErrors for name, method in inspect.getmembers(fake, predicate=inspect.isfunction): - assert not name.startswith( - "_" - ), "if private methods are ever added to the fake, this assert should be a conditional check instead" + assert not name.startswith("_"), ( + "if private methods are ever added to the fake, this assert should be a conditional check instead" + ) sig = inspect.signature(method) args = {param.name: None for param in sig.parameters.values()}