diff --git a/agent/pyproject.toml b/agent/pyproject.toml index c4d176bdd7..9cf1a03fb7 100644 --- a/agent/pyproject.toml +++ b/agent/pyproject.toml @@ -13,7 +13,6 @@ dependencies = [ [dependency-groups] dev = [ - "black", "coverage", "flake8", "isort", @@ -21,6 +20,7 @@ dev = [ "pytest-asyncio", "pytest-cov", "pytest-xdist", + "ruff", "tox", "tox-uv", "yarl", @@ -36,27 +36,12 @@ packages = ["src/balrogagent"] [project.scripts] balrogagent = "balrogagent.cmd:main" -[tool.black] +[tool.ruff] line-length = 160 -target-version = ["py38"] -include = '\.(wsgi|pyi?)$' -exclude = ''' -/( - \.eggs - | \.git - | \.hg - | \.mypy_cache - | \.tox - | \.venv - | \.cache - | \.cache_py3 - | _build - | buck-out - | build - | dist - | ui -)/ -''' +target-version = "py313" + +[tool.ruff.format] +docstring-code-format = true [tool.isort] multi_line_output = 3 diff --git a/agent/tox.ini b/agent/tox.ini index 08a7dd1216..fb2fb9c25e 100644 --- a/agent/tox.ini +++ b/agent/tox.ini @@ -25,7 +25,7 @@ parallel_show_output = true [testenv:check] skip_install = true commands = - black --diff --check {toxinidir} + ruff format --diff {toxinidir} isort --check --diff {toxinidir} flake8 {toxinidir} # Doesn't work without a .git directory @@ -35,13 +35,9 @@ commands = max-line-length = 160 exclude = .ropeproject,.tox,sandbox,build show-source = True -# flake8 doesn't differentiat the use of `:` in dictionaries vs. slices, -# whereas # black formats the a later with surrounding whitespace. This causes -# flake8 to incorrecly report E203. -# See https://black.readthedocs.io/en/stable/the_black_code_style.html#slices # W503 is a default ignore, but gets overridden when we set this, so we need # to add it again ourselves. -ignore = E203,W503 +ignore = W503 [pytest] norecursedirs = .tox .git .hg sandbox build diff --git a/client/pyproject.toml b/client/pyproject.toml index 8252379ced..05cb3c0e95 100644 --- a/client/pyproject.toml +++ b/client/pyproject.toml @@ -13,14 +13,13 @@ requires-python = ">=3.11" [dependency-groups] dev = [ - "black", "coverage", "flake8", - "flake8-black", "isort", "pytest", "pytest-cov", "requests_mock", + "ruff", "tox", "tox-uv", ] @@ -32,26 +31,12 @@ build-backend = "hatchling.build" [tool.hatch.build.targets.wheel] packages = ["src/balrogclient"] -[tool.black] +[tool.ruff] line-length = 160 -include = '\.(wsgi|pyi?)$' -exclude = ''' -/( - \.eggs - | \.git - | \.hg - | \.mypy_cache - | \.tox - | \.venv - | \.cache - | \.cache_py3 - | _build - | buck-out - | build - | dist - | ui -)/ -''' +target-version = "py311" + +[tool.ruff.format] +docstring-code-format = true [tool.isort] multi_line_output = 3 diff --git a/client/tox.ini b/client/tox.ini index 94002b6eb3..34cfe910e8 100644 --- a/client/tox.ini +++ b/client/tox.ini @@ -24,7 +24,7 @@ parallel_show_output = true [testenv:check] commands = - black --diff --check {toxinidir} + ruff format --diff {toxinidir} isort --check --diff {toxinidir} flake8 {toxinidir} @@ -32,13 +32,9 @@ commands = max-line-length = 160 exclude = .ropeproject,.tox,sandbox,build,.venv show-source = True -# flake8 doesn't differentiat the use of `:` in dictionaries vs. slices, -# whereas # black formats the a later with surrounding whitespace. This causes -# flake8 to incorrecly report E203. -# See https://black.readthedocs.io/en/stable/the_black_code_style.html#slices # W503 is a default ignore, but gets overridden when we set this, so we need # to add it again ourselves. -ignore = E203,W503 +ignore = W503 [pytest] norecursedirs = .tox .git .hg sandbox build diff --git a/client/uv.lock b/client/uv.lock index b82664cdff..c743785ed2 100644 --- a/client/uv.lock +++ b/client/uv.lock @@ -12,14 +12,13 @@ dependencies = [ [package.dev-dependencies] dev = [ - { name = "black" }, { name = "coverage" }, { name = "flake8" }, - { name = "flake8-black" }, { name = "isort" }, { name = "pytest" }, { name = "pytest-cov" }, { name = "requests-mock" }, + { name = "ruff" }, { name = "tox" }, { name = "tox-uv" }, ] @@ -29,55 +28,17 @@ requires-dist = [{ name = "requests" }] [package.metadata.requires-dev] dev = [ - { name = "black" }, { name = "coverage" }, { name = "flake8" }, - { name = "flake8-black" }, { name = "isort" }, { name = "pytest" }, { name = "pytest-cov" }, { name = "requests-mock" }, + { name = "ruff" }, { name = "tox" }, { name = "tox-uv" }, ] -[[package]] -name = "black" -version = "26.3.1" -source = { registry = "https://pypi.org/simple" } -dependencies = [ - { name = "click" }, - { name = "mypy-extensions" }, - { name = "packaging" }, - { name = "pathspec" }, - { name = "platformdirs" }, - { name = "pytokens" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/e1/c5/61175d618685d42b005847464b8fb4743a67b1b8fdb75e50e5a96c31a27a/black-26.3.1.tar.gz", hash = "sha256:2c50f5063a9641c7eed7795014ba37b0f5fa227f3d408b968936e24bc0566b07", size = 666155, upload-time = "2026-03-12T03:36:03.593Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/17/57/5f11c92861f9c92eb9dddf515530bc2d06db843e44bdcf1c83c1427824bc/black-26.3.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:28ef38aee69e4b12fda8dba75e21f9b4f979b490c8ac0baa7cb505369ac9e1ff", size = 1851987, upload-time = "2026-03-12T03:40:06.248Z" }, - { url = "https://files.pythonhosted.org/packages/54/aa/340a1463660bf6831f9e39646bf774086dbd8ca7fc3cded9d59bbdf4ad0a/black-26.3.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:bf9bf162ed91a26f1adba8efda0b573bc6924ec1408a52cc6f82cb73ec2b142c", size = 1689499, upload-time = "2026-03-12T03:40:07.642Z" }, - { url = "https://files.pythonhosted.org/packages/f3/01/b726c93d717d72733da031d2de10b92c9fa4c8d0c67e8a8a372076579279/black-26.3.1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:474c27574d6d7037c1bc875a81d9be0a9a4f9ee95e62800dab3cfaadbf75acd5", size = 1754369, upload-time = "2026-03-12T03:40:09.279Z" }, - { url = "https://files.pythonhosted.org/packages/e3/09/61e91881ca291f150cfc9eb7ba19473c2e59df28859a11a88248b5cbbc4d/black-26.3.1-cp311-cp311-win_amd64.whl", hash = "sha256:5e9d0d86df21f2e1677cc4bd090cd0e446278bcbbe49bf3659c308c3e402843e", size = 1413613, upload-time = "2026-03-12T03:40:10.943Z" }, - { url = "https://files.pythonhosted.org/packages/16/73/544f23891b22e7efe4d8f812371ab85b57f6a01b2fc45e3ba2e52ba985b8/black-26.3.1-cp311-cp311-win_arm64.whl", hash = "sha256:9a5e9f45e5d5e1c5b5c29b3bd4265dcc90e8b92cf4534520896ed77f791f4da5", size = 1219719, upload-time = "2026-03-12T03:40:12.597Z" }, - { url = "https://files.pythonhosted.org/packages/dc/f8/da5eae4fc75e78e6dceb60624e1b9662ab00d6b452996046dfa9b8a6025b/black-26.3.1-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:b5e6f89631eb88a7302d416594a32faeee9fb8fb848290da9d0a5f2903519fc1", size = 1895920, upload-time = "2026-03-12T03:40:13.921Z" }, - { url = "https://files.pythonhosted.org/packages/2c/9f/04e6f26534da2e1629b2b48255c264cabf5eedc5141d04516d9d68a24111/black-26.3.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:41cd2012d35b47d589cb8a16faf8a32ef7a336f56356babd9fcf70939ad1897f", size = 1718499, upload-time = "2026-03-12T03:40:15.239Z" }, - { url = "https://files.pythonhosted.org/packages/04/91/a5935b2a63e31b331060c4a9fdb5a6c725840858c599032a6f3aac94055f/black-26.3.1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:0f76ff19ec5297dd8e66eb64deda23631e642c9393ab592826fd4bdc97a4bce7", size = 1794994, upload-time = "2026-03-12T03:40:17.124Z" }, - { url = "https://files.pythonhosted.org/packages/e7/0a/86e462cdd311a3c2a8ece708d22aba17d0b2a0d5348ca34b40cdcbea512e/black-26.3.1-cp312-cp312-win_amd64.whl", hash = "sha256:ddb113db38838eb9f043623ba274cfaf7d51d5b0c22ecb30afe58b1bb8322983", size = 1420867, upload-time = "2026-03-12T03:40:18.83Z" }, - { url = "https://files.pythonhosted.org/packages/5b/e5/22515a19cb7eaee3440325a6b0d95d2c0e88dd180cb011b12ae488e031d1/black-26.3.1-cp312-cp312-win_arm64.whl", hash = "sha256:dfdd51fc3e64ea4f35873d1b3fb25326773d55d2329ff8449139ebaad7357efb", size = 1230124, upload-time = "2026-03-12T03:40:20.425Z" }, - { url = "https://files.pythonhosted.org/packages/f5/77/5728052a3c0450c53d9bb3945c4c46b91baa62b2cafab6801411b6271e45/black-26.3.1-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:855822d90f884905362f602880ed8b5df1b7e3ee7d0db2502d4388a954cc8c54", size = 1895034, upload-time = "2026-03-12T03:40:21.813Z" }, - { url = "https://files.pythonhosted.org/packages/52/73/7cae55fdfdfbe9d19e9a8d25d145018965fe2079fa908101c3733b0c55a0/black-26.3.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:8a33d657f3276328ce00e4d37fe70361e1ec7614da5d7b6e78de5426cb56332f", size = 1718503, upload-time = "2026-03-12T03:40:23.666Z" }, - { url = "https://files.pythonhosted.org/packages/e1/87/af89ad449e8254fdbc74654e6467e3c9381b61472cc532ee350d28cfdafb/black-26.3.1-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:f1cd08e99d2f9317292a311dfe578fd2a24b15dbce97792f9c4d752275c1fa56", size = 1793557, upload-time = "2026-03-12T03:40:25.497Z" }, - { url = "https://files.pythonhosted.org/packages/43/10/d6c06a791d8124b843bf325ab4ac7d2f5b98731dff84d6064eafd687ded1/black-26.3.1-cp313-cp313-win_amd64.whl", hash = "sha256:c7e72339f841b5a237ff14f7d3880ddd0fc7f98a1199e8c4327f9a4f478c1839", size = 1422766, upload-time = "2026-03-12T03:40:27.14Z" }, - { url = "https://files.pythonhosted.org/packages/59/4f/40a582c015f2d841ac24fed6390bd68f0fc896069ff3a886317959c9daf8/black-26.3.1-cp313-cp313-win_arm64.whl", hash = "sha256:afc622538b430aa4c8c853f7f63bc582b3b8030fd8c80b70fb5fa5b834e575c2", size = 1232140, upload-time = "2026-03-12T03:40:28.882Z" }, - { url = "https://files.pythonhosted.org/packages/d5/da/e36e27c9cebc1311b7579210df6f1c86e50f2d7143ae4fcf8a5017dc8809/black-26.3.1-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:2d6bfaf7fd0993b420bed691f20f9492d53ce9a2bcccea4b797d34e947318a78", size = 1889234, upload-time = "2026-03-12T03:40:30.964Z" }, - { url = "https://files.pythonhosted.org/packages/0e/7b/9871acf393f64a5fa33668c19350ca87177b181f44bb3d0c33b2d534f22c/black-26.3.1-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:f89f2ab047c76a9c03f78d0d66ca519e389519902fa27e7a91117ef7611c0568", size = 1720522, upload-time = "2026-03-12T03:40:32.346Z" }, - { url = "https://files.pythonhosted.org/packages/03/87/e766c7f2e90c07fb7586cc787c9ae6462b1eedab390191f2b7fc7f6170a9/black-26.3.1-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:b07fc0dab849d24a80a29cfab8d8a19187d1c4685d8a5e6385a5ce323c1f015f", size = 1787824, upload-time = "2026-03-12T03:40:33.636Z" }, - { url = "https://files.pythonhosted.org/packages/ac/94/2424338fb2d1875e9e83eed4c8e9c67f6905ec25afd826a911aea2b02535/black-26.3.1-cp314-cp314-win_amd64.whl", hash = "sha256:0126ae5b7c09957da2bdbd91a9ba1207453feada9e9fe51992848658c6c8e01c", size = 1445855, upload-time = "2026-03-12T03:40:35.442Z" }, - { url = "https://files.pythonhosted.org/packages/86/43/0c3338bd928afb8ee7471f1a4eec3bdbe2245ccb4a646092a222e8669840/black-26.3.1-cp314-cp314-win_arm64.whl", hash = "sha256:92c0ec1f2cc149551a2b7b47efc32c866406b6891b0ee4625e95967c8f4acfb1", size = 1258109, upload-time = "2026-03-12T03:40:36.832Z" }, - { url = "https://files.pythonhosted.org/packages/8e/0d/52d98722666d6fc6c3dd4c76df339501d6efd40e0ff95e6186a7b7f0befd/black-26.3.1-py3-none-any.whl", hash = "sha256:2bd5aa94fc267d38bb21a70d7410a89f1a1d318841855f698746f8e7f51acd1b", size = 207542, upload-time = "2026-03-12T03:36:01.668Z" }, -] - [[package]] name = "cachetools" version = "7.0.5" @@ -185,18 +146,6 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/2a/68/687187c7e26cb24ccbd88e5069f5ef00eba804d36dde11d99aad0838ab45/charset_normalizer-3.4.6-py3-none-any.whl", hash = "sha256:947cf925bc916d90adba35a64c82aace04fa39b46b52d4630ece166655905a69", size = 61455, upload-time = "2026-03-15T18:53:23.833Z" }, ] -[[package]] -name = "click" -version = "8.3.1" -source = { registry = "https://pypi.org/simple" } -dependencies = [ - { name = "colorama", marker = "sys_platform == 'win32'" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/3d/fa/656b739db8587d7b5dfa22e22ed02566950fbfbcdc20311993483657a5c0/click-8.3.1.tar.gz", hash = "sha256:12ff4785d337a1bb490bb7e9c2b1ee5da3112e94a8622f26a6c77f5d2fc6842a", size = 295065, upload-time = "2025-11-15T20:45:42.706Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/98/78/01c019cdb5d6498122777c1a43056ebb3ebfeef2076d9d026bfe15583b2b/click-8.3.1-py3-none-any.whl", hash = "sha256:981153a64e25f12d547d3426c367a4857371575ee7ad18df2a6183ab0545b2a6", size = 108274, upload-time = "2025-11-15T20:45:41.139Z" }, -] - [[package]] name = "colorama" version = "0.4.6" @@ -342,19 +291,6 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/9f/56/13ab06b4f93ca7cac71078fbe37fcea175d3216f31f85c3168a6bbd0bb9a/flake8-7.3.0-py2.py3-none-any.whl", hash = "sha256:b9696257b9ce8beb888cdbe31cf885c90d31928fe202be0889a7cdafad32f01e", size = 57922, upload-time = "2025-06-20T19:31:34.425Z" }, ] -[[package]] -name = "flake8-black" -version = "0.4.0" -source = { registry = "https://pypi.org/simple" } -dependencies = [ - { name = "black" }, - { name = "flake8" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/d6/c5/99d47b42d31cb820b81f9aa86c63eb6221a1a23e7b3d15e6d528a17457d7/flake8_black-0.4.0.tar.gz", hash = "sha256:bf226868f695dee48d55ff6d7747e900709bfd6f605b7a378c70e711e3fc26cb", size = 13706, upload-time = "2025-09-21T18:56:37.822Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/85/b0/692cb58998c21c0f2348bd128171173455515b164be89bec195eeb8c5d8a/flake8_black-0.4.0-py3-none-any.whl", hash = "sha256:288762d0c9ea065782d87eeecbcc20c69079d17fe1d0f0445f0eb0b0ffb80c39", size = 10145, upload-time = "2025-09-21T18:56:36.597Z" }, -] - [[package]] name = "idna" version = "3.11" @@ -391,15 +327,6 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/27/1a/1f68f9ba0c207934b35b86a8ca3aad8395a3d6dd7921c0686e23853ff5a9/mccabe-0.7.0-py2.py3-none-any.whl", hash = "sha256:6c2d30ab6be0e4a46919781807b4f0d834ebdd6c6e3dca0bda5a15f863427b6e", size = 7350, upload-time = "2022-01-24T01:14:49.62Z" }, ] -[[package]] -name = "mypy-extensions" -version = "1.1.0" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/a2/6e/371856a3fb9d31ca8dac321cda606860fa4548858c0cc45d9d1d4ca2628b/mypy_extensions-1.1.0.tar.gz", hash = "sha256:52e68efc3284861e772bbcd66823fde5ae21fd2fdb51c62a211403730b916558", size = 6343, upload-time = "2025-04-22T14:54:24.164Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/79/7b/2c79738432f5c924bef5071f933bcc9efd0473bac3b4aa584a6f7c1c8df8/mypy_extensions-1.1.0-py3-none-any.whl", hash = "sha256:1be4cccdb0f2482337c4743e60421de3a356cd97508abadd57d47403e94f5505", size = 4963, upload-time = "2025-04-22T14:54:22.983Z" }, -] - [[package]] name = "packaging" version = "26.0" @@ -409,15 +336,6 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/b7/b9/c538f279a4e237a006a2c98387d081e9eb060d203d8ed34467cc0f0b9b53/packaging-26.0-py3-none-any.whl", hash = "sha256:b36f1fef9334a5588b4166f8bcd26a14e521f2b55e6b9de3aaa80d3ff7a37529", size = 74366, upload-time = "2026-01-21T20:50:37.788Z" }, ] -[[package]] -name = "pathspec" -version = "1.0.4" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/fa/36/e27608899f9b8d4dff0617b2d9ab17ca5608956ca44461ac14ac48b44015/pathspec-1.0.4.tar.gz", hash = "sha256:0210e2ae8a21a9137c0d470578cb0e595af87edaa6ebf12ff176f14a02e0e645", size = 131200, upload-time = "2026-01-27T03:59:46.938Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/ef/3c/2c197d226f9ea224a9ab8d197933f9da0ae0aac5b6e0f884e2b8d9c8e9f7/pathspec-1.0.4-py3-none-any.whl", hash = "sha256:fb6ae2fd4e7c921a165808a552060e722767cfa526f99ca5156ed2ce45a5c723", size = 55206, upload-time = "2026-01-27T03:59:45.137Z" }, -] - [[package]] name = "platformdirs" version = "4.9.4" @@ -518,40 +436,6 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/e7/80/73211fc5bfbfc562369b4aa61dc1e4bf07dc7b34df7b317e4539316b809c/python_discovery-1.1.3-py3-none-any.whl", hash = "sha256:90e795f0121bc84572e737c9aa9966311b9fde44ffb88a5953b3ec9b31c6945e", size = 31485, upload-time = "2026-03-10T15:08:13.06Z" }, ] -[[package]] -name = "pytokens" -version = "0.4.1" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/b6/34/b4e015b99031667a7b960f888889c5bd34ef585c85e1cb56a594b92836ac/pytokens-0.4.1.tar.gz", hash = "sha256:292052fe80923aae2260c073f822ceba21f3872ced9a68bb7953b348e561179a", size = 23015, upload-time = "2026-01-30T01:03:45.924Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/3d/92/790ebe03f07b57e53b10884c329b9a1a308648fc083a6d4a39a10a28c8fc/pytokens-0.4.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:d70e77c55ae8380c91c0c18dea05951482e263982911fc7410b1ffd1dadd3440", size = 160864, upload-time = "2026-01-30T01:02:57.882Z" }, - { url = "https://files.pythonhosted.org/packages/13/25/a4f555281d975bfdd1eba731450e2fe3a95870274da73fb12c40aeae7625/pytokens-0.4.1-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:4a58d057208cb9075c144950d789511220b07636dd2e4708d5645d24de666bdc", size = 248565, upload-time = "2026-01-30T01:02:59.912Z" }, - { url = "https://files.pythonhosted.org/packages/17/50/bc0394b4ad5b1601be22fa43652173d47e4c9efbf0044c62e9a59b747c56/pytokens-0.4.1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:b49750419d300e2b5a3813cf229d4e5a4c728dae470bcc89867a9ad6f25a722d", size = 260824, upload-time = "2026-01-30T01:03:01.471Z" }, - { url = "https://files.pythonhosted.org/packages/4e/54/3e04f9d92a4be4fc6c80016bc396b923d2a6933ae94b5f557c939c460ee0/pytokens-0.4.1-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:d9907d61f15bf7261d7e775bd5d7ee4d2930e04424bab1972591918497623a16", size = 264075, upload-time = "2026-01-30T01:03:04.143Z" }, - { url = "https://files.pythonhosted.org/packages/d1/1b/44b0326cb5470a4375f37988aea5d61b5cc52407143303015ebee94abfd6/pytokens-0.4.1-cp311-cp311-win_amd64.whl", hash = "sha256:ee44d0f85b803321710f9239f335aafe16553b39106384cef8e6de40cb4ef2f6", size = 103323, upload-time = "2026-01-30T01:03:05.412Z" }, - { url = "https://files.pythonhosted.org/packages/41/5d/e44573011401fb82e9d51e97f1290ceb377800fb4eed650b96f4753b499c/pytokens-0.4.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:140709331e846b728475786df8aeb27d24f48cbcf7bcd449f8de75cae7a45083", size = 160663, upload-time = "2026-01-30T01:03:06.473Z" }, - { url = "https://files.pythonhosted.org/packages/f0/e6/5bbc3019f8e6f21d09c41f8b8654536117e5e211a85d89212d59cbdab381/pytokens-0.4.1-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:6d6c4268598f762bc8e91f5dbf2ab2f61f7b95bdc07953b602db879b3c8c18e1", size = 255626, upload-time = "2026-01-30T01:03:08.177Z" }, - { url = "https://files.pythonhosted.org/packages/bf/3c/2d5297d82286f6f3d92770289fd439956b201c0a4fc7e72efb9b2293758e/pytokens-0.4.1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:24afde1f53d95348b5a0eb19488661147285ca4dd7ed752bbc3e1c6242a304d1", size = 269779, upload-time = "2026-01-30T01:03:09.756Z" }, - { url = "https://files.pythonhosted.org/packages/20/01/7436e9ad693cebda0551203e0bf28f7669976c60ad07d6402098208476de/pytokens-0.4.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:5ad948d085ed6c16413eb5fec6b3e02fa00dc29a2534f088d3302c47eb59adf9", size = 268076, upload-time = "2026-01-30T01:03:10.957Z" }, - { url = "https://files.pythonhosted.org/packages/2e/df/533c82a3c752ba13ae7ef238b7f8cdd272cf1475f03c63ac6cf3fcfb00b6/pytokens-0.4.1-cp312-cp312-win_amd64.whl", hash = "sha256:3f901fe783e06e48e8cbdc82d631fca8f118333798193e026a50ce1b3757ea68", size = 103552, upload-time = "2026-01-30T01:03:12.066Z" }, - { url = "https://files.pythonhosted.org/packages/cb/dc/08b1a080372afda3cceb4f3c0a7ba2bde9d6a5241f1edb02a22a019ee147/pytokens-0.4.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:8bdb9d0ce90cbf99c525e75a2fa415144fd570a1ba987380190e8b786bc6ef9b", size = 160720, upload-time = "2026-01-30T01:03:13.843Z" }, - { url = "https://files.pythonhosted.org/packages/64/0c/41ea22205da480837a700e395507e6a24425151dfb7ead73343d6e2d7ffe/pytokens-0.4.1-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:5502408cab1cb18e128570f8d598981c68a50d0cbd7c61312a90507cd3a1276f", size = 254204, upload-time = "2026-01-30T01:03:14.886Z" }, - { url = "https://files.pythonhosted.org/packages/e0/d2/afe5c7f8607018beb99971489dbb846508f1b8f351fcefc225fcf4b2adc0/pytokens-0.4.1-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:29d1d8fb1030af4d231789959f21821ab6325e463f0503a61d204343c9b355d1", size = 268423, upload-time = "2026-01-30T01:03:15.936Z" }, - { url = "https://files.pythonhosted.org/packages/68/d4/00ffdbd370410c04e9591da9220a68dc1693ef7499173eb3e30d06e05ed1/pytokens-0.4.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:970b08dd6b86058b6dc07efe9e98414f5102974716232d10f32ff39701e841c4", size = 266859, upload-time = "2026-01-30T01:03:17.458Z" }, - { url = "https://files.pythonhosted.org/packages/a7/c9/c3161313b4ca0c601eeefabd3d3b576edaa9afdefd32da97210700e47652/pytokens-0.4.1-cp313-cp313-win_amd64.whl", hash = "sha256:9bd7d7f544d362576be74f9d5901a22f317efc20046efe2034dced238cbbfe78", size = 103520, upload-time = "2026-01-30T01:03:18.652Z" }, - { url = "https://files.pythonhosted.org/packages/8f/a7/b470f672e6fc5fee0a01d9e75005a0e617e162381974213a945fcd274843/pytokens-0.4.1-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:4a14d5f5fc78ce85e426aa159489e2d5961acf0e47575e08f35584009178e321", size = 160821, upload-time = "2026-01-30T01:03:19.684Z" }, - { url = "https://files.pythonhosted.org/packages/80/98/e83a36fe8d170c911f864bfded690d2542bfcfacb9c649d11a9e6eb9dc41/pytokens-0.4.1-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:97f50fd18543be72da51dd505e2ed20d2228c74e0464e4262e4899797803d7fa", size = 254263, upload-time = "2026-01-30T01:03:20.834Z" }, - { url = "https://files.pythonhosted.org/packages/0f/95/70d7041273890f9f97a24234c00b746e8da86df462620194cef1d411ddeb/pytokens-0.4.1-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:dc74c035f9bfca0255c1af77ddd2d6ae8419012805453e4b0e7513e17904545d", size = 268071, upload-time = "2026-01-30T01:03:21.888Z" }, - { url = "https://files.pythonhosted.org/packages/da/79/76e6d09ae19c99404656d7db9c35dfd20f2086f3eb6ecb496b5b31163bad/pytokens-0.4.1-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:f66a6bbe741bd431f6d741e617e0f39ec7257ca1f89089593479347cc4d13324", size = 271716, upload-time = "2026-01-30T01:03:23.633Z" }, - { url = "https://files.pythonhosted.org/packages/79/37/482e55fa1602e0a7ff012661d8c946bafdc05e480ea5a32f4f7e336d4aa9/pytokens-0.4.1-cp314-cp314-win_amd64.whl", hash = "sha256:b35d7e5ad269804f6697727702da3c517bb8a5228afa450ab0fa787732055fc9", size = 104539, upload-time = "2026-01-30T01:03:24.788Z" }, - { url = "https://files.pythonhosted.org/packages/30/e8/20e7db907c23f3d63b0be3b8a4fd1927f6da2395f5bcc7f72242bb963dfe/pytokens-0.4.1-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:8fcb9ba3709ff77e77f1c7022ff11d13553f3c30299a9fe246a166903e9091eb", size = 168474, upload-time = "2026-01-30T01:03:26.428Z" }, - { url = "https://files.pythonhosted.org/packages/d6/81/88a95ee9fafdd8f5f3452107748fd04c24930d500b9aba9738f3ade642cc/pytokens-0.4.1-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:79fc6b8699564e1f9b521582c35435f1bd32dd06822322ec44afdeba666d8cb3", size = 290473, upload-time = "2026-01-30T01:03:27.415Z" }, - { url = "https://files.pythonhosted.org/packages/cf/35/3aa899645e29b6375b4aed9f8d21df219e7c958c4c186b465e42ee0a06bf/pytokens-0.4.1-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:d31b97b3de0f61571a124a00ffe9a81fb9939146c122c11060725bd5aea79975", size = 303485, upload-time = "2026-01-30T01:03:28.558Z" }, - { url = "https://files.pythonhosted.org/packages/52/a0/07907b6ff512674d9b201859f7d212298c44933633c946703a20c25e9d81/pytokens-0.4.1-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:967cf6e3fd4adf7de8fc73cd3043754ae79c36475c1c11d514fc72cf5490094a", size = 306698, upload-time = "2026-01-30T01:03:29.653Z" }, - { url = "https://files.pythonhosted.org/packages/39/2a/cbbf9250020a4a8dd53ba83a46c097b69e5eb49dd14e708f496f548c6612/pytokens-0.4.1-cp314-cp314t-win_amd64.whl", hash = "sha256:584c80c24b078eec1e227079d56dc22ff755e0ba8654d8383b2c549107528918", size = 116287, upload-time = "2026-01-30T01:03:30.912Z" }, - { url = "https://files.pythonhosted.org/packages/c6/78/397db326746f0a342855b81216ae1f0a32965deccfd7c830a2dbc66d2483/pytokens-0.4.1-py3-none-any.whl", hash = "sha256:26cef14744a8385f35d0e095dc8b3a7583f6c953c2e3d269c7f82484bf5ad2de", size = 13729, upload-time = "2026-01-30T01:03:45.029Z" }, -] - [[package]] name = "requests" version = "2.32.5" @@ -579,6 +463,31 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/97/ec/889fbc557727da0c34a33850950310240f2040f3b1955175fdb2b36a8910/requests_mock-1.12.1-py2.py3-none-any.whl", hash = "sha256:b1e37054004cdd5e56c84454cc7df12b25f90f382159087f4b6915aaeef39563", size = 27695, upload-time = "2024-03-29T03:54:27.64Z" }, ] +[[package]] +name = "ruff" +version = "0.15.6" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/51/df/f8629c19c5318601d3121e230f74cbee7a3732339c52b21daa2b82ef9c7d/ruff-0.15.6.tar.gz", hash = "sha256:8394c7bb153a4e3811a4ecdacd4a8e6a4fa8097028119160dffecdcdf9b56ae4", size = 4597916, upload-time = "2026-03-12T23:05:47.51Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/9e/2f/4e03a7e5ce99b517e98d3b4951f411de2b0fa8348d39cf446671adcce9a2/ruff-0.15.6-py3-none-linux_armv6l.whl", hash = "sha256:7c98c3b16407b2cf3d0f2b80c80187384bc92c6774d85fefa913ecd941256fff", size = 10508953, upload-time = "2026-03-12T23:05:17.246Z" }, + { url = "https://files.pythonhosted.org/packages/70/60/55bcdc3e9f80bcf39edf0cd272da6fa511a3d94d5a0dd9e0adf76ceebdb4/ruff-0.15.6-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:ee7dcfaad8b282a284df4aa6ddc2741b3f4a18b0555d626805555a820ea181c3", size = 10942257, upload-time = "2026-03-12T23:05:23.076Z" }, + { url = "https://files.pythonhosted.org/packages/e7/f9/005c29bd1726c0f492bfa215e95154cf480574140cb5f867c797c18c790b/ruff-0.15.6-py3-none-macosx_11_0_arm64.whl", hash = "sha256:3bd9967851a25f038fc8b9ae88a7fbd1b609f30349231dffaa37b6804923c4bb", size = 10322683, upload-time = "2026-03-12T23:05:33.738Z" }, + { url = "https://files.pythonhosted.org/packages/5f/74/2f861f5fd7cbb2146bddb5501450300ce41562da36d21868c69b7a828169/ruff-0.15.6-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:13f4594b04e42cd24a41da653886b04d2ff87adbf57497ed4f728b0e8a4866f8", size = 10660986, upload-time = "2026-03-12T23:05:53.245Z" }, + { url = "https://files.pythonhosted.org/packages/c1/a1/309f2364a424eccb763cdafc49df843c282609f47fe53aa83f38272389e0/ruff-0.15.6-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:e2ed8aea2f3fe57886d3f00ea5b8aae5bf68d5e195f487f037a955ff9fbaac9e", size = 10332177, upload-time = "2026-03-12T23:05:56.145Z" }, + { url = "https://files.pythonhosted.org/packages/30/41/7ebf1d32658b4bab20f8ac80972fb19cd4e2c6b78552be263a680edc55ac/ruff-0.15.6-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:70789d3e7830b848b548aae96766431c0dc01a6c78c13381f423bf7076c66d15", size = 11170783, upload-time = "2026-03-12T23:06:01.742Z" }, + { url = "https://files.pythonhosted.org/packages/76/be/6d488f6adca047df82cd62c304638bcb00821c36bd4881cfca221561fdfc/ruff-0.15.6-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:542aaf1de3154cea088ced5a819ce872611256ffe2498e750bbae5247a8114e9", size = 12044201, upload-time = "2026-03-12T23:05:28.697Z" }, + { url = "https://files.pythonhosted.org/packages/71/68/e6f125df4af7e6d0b498f8d373274794bc5156b324e8ab4bf5c1b4fc0ec7/ruff-0.15.6-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:1c22e6f02c16cfac3888aa636e9eba857254d15bbacc9906c9689fdecb1953ab", size = 11421561, upload-time = "2026-03-12T23:05:31.236Z" }, + { url = "https://files.pythonhosted.org/packages/f1/9f/f85ef5fd01a52e0b472b26dc1b4bd228b8f6f0435975442ffa4741278703/ruff-0.15.6-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:98893c4c0aadc8e448cfa315bd0cc343a5323d740fe5f28ef8a3f9e21b381f7e", size = 11310928, upload-time = "2026-03-12T23:05:45.288Z" }, + { url = "https://files.pythonhosted.org/packages/8c/26/b75f8c421f5654304b89471ed384ae8c7f42b4dff58fa6ce1626d7f2b59a/ruff-0.15.6-py3-none-manylinux_2_31_riscv64.whl", hash = "sha256:70d263770d234912374493e8cc1e7385c5d49376e41dfa51c5c3453169dc581c", size = 11235186, upload-time = "2026-03-12T23:05:50.677Z" }, + { url = "https://files.pythonhosted.org/packages/fc/d4/d5a6d065962ff7a68a86c9b4f5500f7d101a0792078de636526c0edd40da/ruff-0.15.6-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:55a1ad63c5a6e54b1f21b7514dfadc0c7fb40093fa22e95143cf3f64ebdcd512", size = 10635231, upload-time = "2026-03-12T23:05:37.044Z" }, + { url = "https://files.pythonhosted.org/packages/d6/56/7c3acf3d50910375349016cf33de24be021532042afbed87942858992491/ruff-0.15.6-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:8dc473ba093c5ec238bb1e7429ee676dca24643c471e11fbaa8a857925b061c0", size = 10340357, upload-time = "2026-03-12T23:06:04.748Z" }, + { url = "https://files.pythonhosted.org/packages/06/54/6faa39e9c1033ff6a3b6e76b5df536931cd30caf64988e112bbf91ef5ce5/ruff-0.15.6-py3-none-musllinux_1_2_i686.whl", hash = "sha256:85b042377c2a5561131767974617006f99f7e13c63c111b998f29fc1e58a4cfb", size = 10860583, upload-time = "2026-03-12T23:05:58.978Z" }, + { url = "https://files.pythonhosted.org/packages/cb/1e/509a201b843b4dfb0b32acdedf68d951d3377988cae43949ba4c4133a96a/ruff-0.15.6-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:cef49e30bc5a86a6a92098a7fbf6e467a234d90b63305d6f3ec01225a9d092e0", size = 11410976, upload-time = "2026-03-12T23:05:39.955Z" }, + { url = "https://files.pythonhosted.org/packages/6c/25/3fc9114abf979a41673ce877c08016f8e660ad6cf508c3957f537d2e9fa9/ruff-0.15.6-py3-none-win32.whl", hash = "sha256:bbf67d39832404812a2d23020dda68fee7f18ce15654e96fb1d3ad21a5fe436c", size = 10616872, upload-time = "2026-03-12T23:05:42.451Z" }, + { url = "https://files.pythonhosted.org/packages/89/7a/09ece68445ceac348df06e08bf75db72d0e8427765b96c9c0ffabc1be1d9/ruff-0.15.6-py3-none-win_amd64.whl", hash = "sha256:aee25bc84c2f1007ecb5037dff75cef00414fdf17c23f07dc13e577883dca406", size = 11787271, upload-time = "2026-03-12T23:05:20.168Z" }, + { url = "https://files.pythonhosted.org/packages/7f/d0/578c47dd68152ddddddf31cd7fc67dc30b7cdf639a86275fda821b0d9d98/ruff-0.15.6-py3-none-win_arm64.whl", hash = "sha256:c34de3dd0b0ba203be50ae70f5910b17188556630e2178fd7d79fc030eb0d837", size = 11060497, upload-time = "2026-03-12T23:05:25.968Z" }, +] + [[package]] name = "tomli" version = "2.4.0" diff --git a/pyproject.toml b/pyproject.toml index bb291cd7ae..f7f0fd8cb0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -49,13 +49,10 @@ members = [ [dependency-groups] dev = [ - # held back due to https://github.com/psf/black/issues/4963 - "black<26.1.0", "coverage", "coveralls", "fakeredis", "flake8", - "flake8-black", # https://github.com/HypothesisWorks/hypothesis/issues/4638 "hypothesis<6.150.0", "isort", @@ -65,6 +62,7 @@ dev = [ "pytest-cov", "pytest-responses", "pytest-xdist", + "ruff", "tox", "tox-uv", ] @@ -81,27 +79,13 @@ build-backend = "hatchling.build" [tool.hatch.build.targets.wheel] packages = ["src/auslib"] -[tool.black] +[tool.ruff] line-length = 160 -target-version = ["py38"] -include = '\.(wsgi|pyi?)$' -exclude = ''' -/( - \.eggs - | \.git - | \.hg - | \.mypy_cache - | \.tox - | \.venv - | \.cache - | \.cache_py3 - | _build - | buck-out - | build - | dist - | ui -)/ -''' +target-version = "py313" +extend-exclude = ["ui"] + +[tool.ruff.format] +docstring-code-format = true [tool.isort] multi_line_output = 3 diff --git a/scripts/adhoc-tests.py b/scripts/adhoc-tests.py index 99e0103b55..8170a71ae0 100755 --- a/scripts/adhoc-tests.py +++ b/scripts/adhoc-tests.py @@ -79,7 +79,7 @@ def make_url(self, environment, interface, append): def version(self, environment, interface): url = self.make_url(environment, interface, "__version__") version = self.balrog_request("GET", url, headers=self.headers) - log.info(f' {environment}-{interface} version: {version["version"]}') + log.info(f" {environment}-{interface} version: {version['version']}") def heartbeat(self, environment, interface): url = self.make_url(environment, interface, "__heartbeat__") @@ -92,35 +92,35 @@ def heartbeat(self, environment, interface): def admin_releases(self, environment, interface): url = self.make_url(environment, interface, "releases") releases = self.balrog_request("GET", url, headers=self.headers) - log.info(f' {len(releases["releases"])} releases found') + log.info(f" {len(releases['releases'])} releases found") url = self.make_url(environment, interface, "api/releases") releases = self.balrog_request("GET", url, headers=self.headers) - log.info(f' {len(releases["releases"])} api/releases found') + log.info(f" {len(releases['releases'])} api/releases found") url = self.make_url(environment, interface, "api/v2/releases") releases = self.balrog_request("GET", url, headers=self.headers) - log.info(f' {len(releases["releases"])} api/v2/releases found') + log.info(f" {len(releases['releases'])} api/v2/releases found") if test_level > 2: for r in releases["releases"][-10:]: - log.info(f'{r["name"]} ({r["product"]}, {r["data_version"]})') - url = self.make_url(environment, interface, f'api/v2/releases/{r["name"]}') + log.info(f"{r['name']} ({r['product']}, {r['data_version']})") + url = self.make_url(environment, interface, f"api/v2/releases/{r['name']}") self.balrog_request("GET", url, headers=self.headers) def admin_scheduled_changes(self, environment, interface): url = self.make_url(environment, interface, "scheduled_changes/emergency_shutoff") resp = self.balrog_request("GET", url, headers=self.headers) - log.info(f' {resp["count"]} scheduled changes') + log.info(f" {resp['count']} scheduled changes") url = self.make_url(environment, interface, "scheduled_changes/required_signoffs/permissions") resp = self.balrog_request("GET", url, headers=self.headers) - log.info(f' {resp["count"]} scheduled changes') + log.info(f" {resp['count']} scheduled changes") url = self.make_url(environment, interface, "scheduled_changes/required_signoffs/product") resp = self.balrog_request("GET", url, headers=self.headers) - log.info(f' {resp["count"]} scheduled changes') + log.info(f" {resp['count']} scheduled changes") url = self.make_url(environment, interface, "scheduled_changes/releases") resp = self.balrog_request("GET", url, headers=self.headers) - log.info(f' {resp["count"]} scheduled changes') + log.info(f" {resp['count']} scheduled changes") url = self.make_url(environment, interface, "scheduled_changes/rules") resp = self.balrog_request("GET", url, headers=self.headers) - log.info(f' {resp["count"]} scheduled changes') + log.info(f" {resp['count']} scheduled changes") def public_updates(self, environment, interface): # TODO many other interesting and important endpoints @@ -135,14 +135,14 @@ def public_updates(self, environment, interface): def public_releases(self, environment, interface): url = self.make_url(environment, interface, "api/v1/releases") releases = self.balrog_request("GET", url, headers=self.headers) - log.info(f' {len(releases["releases"])} api/v1/releases found') + log.info(f" {len(releases['releases'])} api/v1/releases found") url = self.make_url(environment, interface, "api/v1/releases?name_prefix=Firefox") releases = self.balrog_request("GET", url, headers=self.headers) log.info(f' {len(releases["releases"])} api/v1/releases starting with "Firefox" found') if test_level > 2: for r in releases["releases"][-10:]: - log.info(f'{r["name"]} ({r["product"]}, {r["data_version"]})') - url = self.make_url(environment, interface, f'api/v1/releases/{r["name"]}') + log.info(f"{r['name']} ({r['product']}, {r['data_version']})") + url = self.make_url(environment, interface, f"api/v1/releases/{r['name']}") self.balrog_request("GET", url, headers=self.headers) def run_tests_admin(self): diff --git a/scripts/get-prod-db-dump.py b/scripts/get-prod-db-dump.py index 85be979a3a..e67a825ea7 100644 --- a/scripts/get-prod-db-dump.py +++ b/scripts/get-prod-db-dump.py @@ -83,7 +83,7 @@ def setLocalDBPermissions(): try: rsp = urlopen(HOST + PATH, timeout=TIMEOUT) except (HTTPError, URLError) as e: - logging.debug("Downloading the latest database dump failed" "due to network error: %s", e) + logging.debug("Downloading the latest database dump faileddue to network error: %s", e) exit(1) with open(LOCAL_DB_PATH, "wb") as f: diff --git a/src/auslib/util/jsonschema_validators.py b/src/auslib/util/jsonschema_validators.py index fd43509562..712e7ebf78 100644 --- a/src/auslib/util/jsonschema_validators.py +++ b/src/auslib/util/jsonschema_validators.py @@ -46,9 +46,7 @@ def version_validator(field_value): try: op, operand = get_op(rule_version) if is_list_of_versions and op != operator.eq: - raise jsonschema.ValidationError( - "Invalid input for %s .Relational Operators are not allowed" " when providing a list of versions." % field_value - ) + raise jsonschema.ValidationError("Invalid input for %s .Relational Operators are not allowed when providing a list of versions." % field_value) version = MozillaVersion(operand) except jsonschema.ValidationError: raise diff --git a/src/auslib/web/admin/views/permissions.py b/src/auslib/web/admin/views/permissions.py index 9779882851..da89c0529c 100644 --- a/src/auslib/web/admin/views/permissions.py +++ b/src/auslib/web/admin/views/permissions.py @@ -43,7 +43,7 @@ def get_user_permission(username, permission, changed_by): try: perm = dbo.permissions.getUserPermissions(username, changed_by)[permission] except KeyError: - return problem(404, "Not Found", "Requested user permission" " %s not found for %s" % (permission, username)) + return problem(404, "Not Found", "Requested user permission %s not found for %s" % (permission, username)) return jsonify(perm) @@ -89,7 +89,7 @@ def ensure_user_permission(username, permission, user_permission_request_body, c @transactionHandler def update_user_permission(username, permission, user_permission_request_body, changed_by, transaction): if not dbo.permissions.getUserPermissions(username, changed_by, transaction=transaction).get(permission): - return problem(status=404, title="Not Found", detail="Requested user permission" " %s not found for %s" % (permission, username)) + return problem(status=404, title="Not Found", detail="Requested user permission %s not found for %s" % (permission, username)) try: # Existing Permission if not user_permission_request_body.get("data_version"): @@ -118,7 +118,7 @@ def update_user_permission(username, permission, user_permission_request_body, c @transactionHandler def delete_user_permission(username, permission, data_version, changed_by, transaction): if not dbo.permissions.getUserPermissions(username, changed_by, transaction=transaction).get(permission): - return problem(404, "Not Found", "Requested user permission" " %s not found for %s" % (permission, username)) + return problem(404, "Not Found", "Requested user permission %s not found for %s" % (permission, username)) try: # For practical purposes, DELETE can't have a request body, which means the Form # won't find data where it's expecting it. Instead, we have to tell it to look at @@ -141,7 +141,7 @@ def get_scheduled_changes(): @transactionHandler def schedule_change(sc_permission_body, transaction, changed_by): if sc_permission_body.get("when", None) is None: - return problem(400, "Bad Request", "'when' cannot be set to null when scheduling a new change " "for a Permission") + return problem(400, "Bad Request", "'when' cannot be set to null when scheduling a new change for a Permission") change_type = sc_permission_body.get("change_type") what = sc_permission_body @@ -267,7 +267,7 @@ def grant_role(username, role, changed_by, transaction): def revoke_role(username, role, data_version, changed_by, transaction): roles = [r["role"] for r in dbo.permissions.getUserRoles(username)] if role not in roles: - return problem(404, "Not Found", "Role not found", ext={"exception": "No role '%s' found for " "username '%s'" % (role, username)}) + return problem(404, "Not Found", "Role not found", ext={"exception": "No role '%s' found for username '%s'" % (role, username)}) # query argument i.e. data_version is also required. # All input value validations already defined in swagger specification and carried out by connexion dbo.permissions.revokeRole(username, role, changed_by=changed_by, old_data_version=data_version, transaction=transaction) diff --git a/src/auslib/web/admin/views/releases.py b/src/auslib/web/admin/views/releases.py index a2333beb8e..03e159b668 100644 --- a/src/auslib/web/admin/views/releases.py +++ b/src/auslib/web/admin/views/releases.py @@ -120,7 +120,7 @@ def changeRelease(release, changed_by, transaction, existsCallback, commitCallba log.warning("Bad input: %s", rel) return problem(400, "Bad Request", msg) if "hashFunction" in releaseInfo["data"] and hashFunction and hashFunction != releaseInfo["data"]["hashFunction"]: - msg = "hashFunction '{0}' doesn't match the one on the release " "object ('{1}') for release '{2}'".format( + msg = "hashFunction '{0}' doesn't match the one on the release object ('{1}') for release '{2}'".format( hashFunction, releaseInfo["data"]["hashFunction"], rel ) log.warning("Bad input: %s", rel) @@ -418,7 +418,7 @@ def get_scheduled_changes(): def create_scheduled_change(sc_release_body, transaction, changed_by): what = sc_release_body if what.get("when", None) is None: - return problem(400, "Bad Request", "'when' cannot be set to null when scheduling a new change " "for a Release") + return problem(400, "Bad Request", "'when' cannot be set to null when scheduling a new change for a Release") change_type = what.get("change_type") if change_type == "update": diff --git a/src/auslib/web/admin/views/required_signoffs.py b/src/auslib/web/admin/views/required_signoffs.py index b7298a6dfb..d74d023003 100644 --- a/src/auslib/web/admin/views/required_signoffs.py +++ b/src/auslib/web/admin/views/required_signoffs.py @@ -150,7 +150,7 @@ def product_get_scheduled_changes(): @transactionHandler def product_create_scheduled_change(sc_rs_product_body, transaction, changed_by): if sc_rs_product_body.get("when", None) is None: - return problem(400, "Bad Request", "when cannot be set to null when scheduling a new change " "for a Product Required Signoff") + return problem(400, "Bad Request", "when cannot be set to null when scheduling a new change for a Product Required Signoff") change_type = sc_rs_product_body.get("change_type") what = {} @@ -308,7 +308,7 @@ def permissions_get_scheduled_changes(): @transactionHandler def permissions_create_scheduled_change(sc_rs_permission_body, transaction, changed_by): if sc_rs_permission_body.get("when", None) is None: - return problem(400, "Bad Request", "'when' cannot be set to null when scheduling a new change " "for a Permissions Required Signoff") + return problem(400, "Bad Request", "'when' cannot be set to null when scheduling a new change for a Permissions Required Signoff") change_type = sc_rs_permission_body.get("change_type") what = {} @@ -350,7 +350,7 @@ def permissions_update_scheduled_change(sc_id, sc_permission_rs_body, transactio if sc_rs_permission: change_type = sc_rs_permission[0]["change_type"] else: - return problem(404, "Not Found", "Unknown sc_id", ext={"exception": "No scheduled change for permission required " "signoff found for given sc_id"}) + return problem(404, "Not Found", "Unknown sc_id", ext={"exception": "No scheduled change for permission required signoff found for given sc_id"}) what = {} for field in sc_permission_rs_body: if ( diff --git a/src/auslib/web/admin/views/rules.py b/src/auslib/web/admin/views/rules.py index cb718f913b..1ca9dc1ed8 100644 --- a/src/auslib/web/admin/views/rules.py +++ b/src/auslib/web/admin/views/rules.py @@ -190,7 +190,7 @@ def get_scheduled_changes(): @transactionHandler def create_scheduled_change(sc_rule_body, transaction, changed_by): if sc_rule_body.get("when", None) is None: - return problem(400, "Bad Request", "'when' cannot be set to null when scheduling a new change " "for a Rule") + return problem(400, "Bad Request", "'when' cannot be set to null when scheduling a new change for a Rule") if sc_rule_body: change_type = sc_rule_body.get("change_type") else: @@ -222,7 +222,7 @@ def create_scheduled_change(sc_rule_body, transaction, changed_by): 400, "Bad Request", "Null/Empty Value", - ext={"exception": "%s cannot be set to null/empty " "when scheduling insertion of a new rule" % field}, + ext={"exception": "%s cannot be set to null/empty when scheduling insertion of a new rule" % field}, ) if change_type in ["update", "insert"]: @@ -286,7 +286,7 @@ def update_scheduled_change(sc_id, sc_rule_body, transaction, changed_by): for field in ["update_type", "backgroundRate", "priority"]: if field in what and what.get(field) is None or isinstance(what.get(field), str) and what.get(field).strip() == "": return problem( - 400, "Bad Request", "Null/Empty Value", ext={"exception": "%s cannot be set to null " "when scheduling insertion of a new rule" % field} + 400, "Bad Request", "Null/Empty Value", ext={"exception": "%s cannot be set to null when scheduling insertion of a new rule" % field} ) if change_type in ["update", "insert"]: diff --git a/src/auslib/web/common/rules.py b/src/auslib/web/common/rules.py index 2691421199..962829c81a 100644 --- a/src/auslib/web/common/rules.py +++ b/src/auslib/web/common/rules.py @@ -56,5 +56,5 @@ def get_history(rule_id): except (ValueError, AssertionError) as msg: log.warning("Bad input: %s", msg) return problem( - 400, "Bad Request", "Error occurred when trying to fetch" " Rule's revisions having rule_id {0}".format(rule_id), ext={"exception": str(msg)} + 400, "Bad Request", "Error occurred when trying to fetch Rule's revisions having rule_id {0}".format(rule_id), ext={"exception": str(msg)} ) diff --git a/taskcluster/balrog_taskgraph/transforms/docker_push.py b/taskcluster/balrog_taskgraph/transforms/docker_push.py index 4941be6fb9..e04ce009f0 100644 --- a/taskcluster/balrog_taskgraph/transforms/docker_push.py +++ b/taskcluster/balrog_taskgraph/transforms/docker_push.py @@ -6,7 +6,6 @@ Set environment variables for the skopeo push-image command """ - import os import tomllib diff --git a/taskcluster/balrog_taskgraph/transforms/run_on_releases.py b/taskcluster/balrog_taskgraph/transforms/run_on_releases.py index 274d2885b7..eebb9d8074 100644 --- a/taskcluster/balrog_taskgraph/transforms/run_on_releases.py +++ b/taskcluster/balrog_taskgraph/transforms/run_on_releases.py @@ -6,7 +6,6 @@ Support run-on-releases option """ - from taskgraph.transforms.base import TransformSequence transforms = TransformSequence() diff --git a/tests/blobs/test_apprelease.py b/tests/blobs/test_apprelease.py index 4ab68dc61e..1e15dca29c 100755 --- a/tests/blobs/test_apprelease.py +++ b/tests/blobs/test_apprelease.py @@ -3379,7 +3379,7 @@ def testWithoutActionsByLocale(self): "force": None, } returned_header = self.blobH2.getInnerHeaderXML(updateQuery, "minor", self.allowlistedDomains, self.specialForceHosts) - expected_header = '' + expected_header = '' self.assertEqual(returned_header.strip(), expected_header.strip()) returned = self.blobH2.getInnerXML(updateQuery, "minor", self.allowlistedDomains, self.specialForceHosts) @@ -3409,7 +3409,7 @@ def testWithoutActionsByChannel(self): "force": None, } returned_header = self.blobH2.getInnerHeaderXML(updateQuery, "minor", self.allowlistedDomains, self.specialForceHosts) - expected_header = '' + expected_header = '' self.assertEqual(returned_header.strip(), expected_header.strip()) returned = self.blobH2.getInnerXML(updateQuery, "minor", self.allowlistedDomains, self.specialForceHosts) @@ -3439,7 +3439,7 @@ def testWithoutActionsByVersion(self): "force": None, } returned_header = self.blobH2.getInnerHeaderXML(updateQuery, "minor", self.allowlistedDomains, self.specialForceHosts) - expected_header = '' + expected_header = '' self.assertEqual(returned_header.strip(), expected_header.strip()) returned = self.blobH2.getInnerXML(updateQuery, "minor", self.allowlistedDomains, self.specialForceHosts) @@ -3469,7 +3469,7 @@ def testWithoutActionsByBuildID(self): "force": None, } returned_header = self.blobH2.getInnerHeaderXML(updateQuery, "minor", self.allowlistedDomains, self.specialForceHosts) - expected_header = '' + expected_header = '' self.assertEqual(returned_header.strip(), expected_header.strip()) returned = self.blobH2.getInnerXML(updateQuery, "minor", self.allowlistedDomains, self.specialForceHosts) @@ -3725,8 +3725,7 @@ def testDisableBackgroundUpdates(self): } returned_header = blob.getInnerHeaderXML(updateQuery, "minor", self.allowlistedDomains, self.specialForceHosts) expected_header = ( - '' + '' ) self.assertEqual(returned_header.strip(), expected_header.strip()) @@ -3979,7 +3978,7 @@ def setUp(self): def testGetAdditionalPatchAttributesComplete(self): patch = { - "hashValue": "d456a23ff5a6b35146d9edf05ccc983b0b7b6695fdc11e8d4f44a704c63ae69a585c3429bb90fece5a34a59b06f54" "b1c947178b9038ce6c83a1b6ac8a86f4274", + "hashValue": "d456a23ff5a6b35146d9edf05ccc983b0b7b6695fdc11e8d4f44a704c63ae69a585c3429bb90fece5a34a59b06f54b1c947178b9038ce6c83a1b6ac8a86f4274", "from": "*", "filesize": 49376124, "binTransInclusionProof": "foobar", @@ -3992,7 +3991,7 @@ def testGetAdditionalPatchAttributesComplete(self): def testGetAdditionalPatchAttributesPartial(self): patch = { - "hashValue": "dffd728108a176b1aeca390a420200daa9272f246587f81fde41ad3f5c44bf6de17fb7899b4353e5cbaa8528ea389" "234890221188db5bb58588ad366c2be0676", + "hashValue": "dffd728108a176b1aeca390a420200daa9272f246587f81fde41ad3f5c44bf6de17fb7899b4353e5cbaa8528ea389234890221188db5bb58588ad366c2be0676", "from": "Firefox-54.0b12-build1", "filesize": 28264739, "binTransInclusionProof": "barfoo", diff --git a/tests/test_db.py b/tests/test_db.py index 7830a289ba..07bee67349 100644 --- a/tests/test_db.py +++ b/tests/test_db.py @@ -5715,7 +5715,7 @@ def setUpClass(cls): "timetuple", ) cls.property_err_msg = ( - "Property '{property}' on '{table_name}.{column}' differs between model " "and migration: (model) {model_prop} != (migration) {reflected_prop}" + "Property '{property}' on '{table_name}.{column}' differs between model and migration: (model) {model_prop} != (migration) {reflected_prop}" ) def setUp(self): diff --git a/tests/util/test_versions.py b/tests/util/test_versions.py index 1556c4caf2..cddf25f8bb 100644 --- a/tests/util/test_versions.py +++ b/tests/util/test_versions.py @@ -60,7 +60,7 @@ def cmp(x, y): if wanted is BadDataError: continue else: - raise AssertionError(("cmp(%s, %s) " "shouldn't raise BadDataError") % (v1, v2)) + raise AssertionError(("cmp(%s, %s) shouldn't raise BadDataError") % (v1, v2)) self.assertEqual(res, wanted, "cmp(%s, %s) should be %s, got %s" % (v1, v2, wanted, res)) def test_glob(self): diff --git a/tests/web/api/base.py b/tests/web/api/base.py index f6ae108930..4fcd65e6de 100644 --- a/tests/web/api/base.py +++ b/tests/web/api/base.py @@ -16,7 +16,6 @@ def setUpModule(): @pytest.mark.usefixtures("current_db_schema", "app") class CommonTestBase(unittest.TestCase): - @pytest.fixture(autouse=True) def setup(self, insert_release, firefox_54_0_1_build1, firefox_56_0_build1, superblob_e8f4a19, hotfix_bug_1548973_1_1_4, timecop_1_0): redis = fakeredis.FakeRedis() diff --git a/tests/web/test_client.py b/tests/web/test_client.py index 071fa5bcf7..ecfb6eaae5 100644 --- a/tests/web/test_client.py +++ b/tests/web/test_client.py @@ -941,7 +941,6 @@ def _inner(_, failures=0, success=True): @pytest.mark.usefixtures("mock_autograph") class ClientTest(ClientTestBase): - def testGetHeaderArchitectureWindows(self): self.assertEqual(client_api.getHeaderArchitecture("WINNT_x86-msvc", "Firefox Intel Windows"), "Intel") @@ -2380,13 +2379,13 @@ def testSentryRealError(self, mocked_pipeline): def testNonSubstitutedUrlVariablesReturnEmptyUpdate(self): request1 = "/update/1/%PRODUCT%/%VERSION%/%BUILD_ID%/%BUILD_TARGET%/%LOCALE%/%CHANNEL%/update.xml" request2 = "/update/2/%PRODUCT%/%VERSION%/%BUILD_ID%/%BUILD_TARGET%/%LOCALE%/%CHANNEL%/%OS_VERSION%/update.xml" - request3 = "/update/3/%PRODUCT%/%VERSION%/%BUILD_ID%/%BUILD_TARGET%/%LOCALE%/%CHANNEL%/%OS_VERSION%/%DISTRIBUTION%/%DISTRIBUTION_VERSION%/" "update.xml" + request3 = "/update/3/%PRODUCT%/%VERSION%/%BUILD_ID%/%BUILD_TARGET%/%LOCALE%/%CHANNEL%/%OS_VERSION%/%DISTRIBUTION%/%DISTRIBUTION_VERSION%/update.xml" request4 = ( "/update/4/%PRODUCT%/%VERSION%/%BUILD_ID%/%BUILD_TARGET%/%LOCALE%/%CHANNEL%/%OS_VERSION%/%DISTRIBUTION%/%DISTRIBUTION_VERSION%/" "%MOZ_VERSION%/update.xml" ) request5 = ( - "/update/5/%PRODUCT%/%VERSION%/%BUILD_ID%/%BUILD_TARGET%/%LOCALE%/%CHANNEL%/%OS_VERSION%/%DISTRIBUTION%/%DISTRIBUTION_VERSION%/" "%IMEI%/update.xml" + "/update/5/%PRODUCT%/%VERSION%/%BUILD_ID%/%BUILD_TARGET%/%LOCALE%/%CHANNEL%/%OS_VERSION%/%DISTRIBUTION%/%DISTRIBUTION_VERSION%/%IMEI%/update.xml" ) request6 = ( "/update/6/%PRODUCT%/%VERSION%/%BUILD_ID%/%BUILD_TARGET%/%LOCALE%/%CHANNEL%/%OS_VERSION%/%SYSTEM_CAPABILITIES%/%DISTRIBUTION%/" diff --git a/tox.ini b/tox.ini index b8fa1763d2..766fdcfa4d 100644 --- a/tox.ini +++ b/tox.ini @@ -37,7 +37,7 @@ ignore_outcome = true [testenv:check] skip_install = true commands = - black --diff --check scripts src taskcluster tests uwsgi + ruff format --diff scripts src taskcluster tests uwsgi isort --check --diff scripts src taskcluster tests uwsgi flake8 scripts src taskcluster tests uwsgi @@ -45,13 +45,9 @@ commands = max-line-length = 160 exclude = .ropeproject,.tox,sandbox,build show-source = True -# flake8 doesn't differentiat the use of `:` in dictionaries vs. slices, -# whereas # black formats the a later with surrounding whitespace. This causes -# flake8 to incorrecly report E203. -# See https://black.readthedocs.io/en/stable/the_black_code_style.html#slices # W503 is a default ignore, but gets overridden when we set this, so we need # to add it again ourselves. -ignore = E203,W503 +ignore = W503 [pytest] norecursedirs = .tox .git .hg sandbox build diff --git a/uv.lock b/uv.lock index 4e0fe3b769..4cd5873289 100644 --- a/uv.lock +++ b/uv.lock @@ -257,12 +257,10 @@ dependencies = [ [package.dev-dependencies] dev = [ - { name = "black" }, { name = "coverage" }, { name = "coveralls" }, { name = "fakeredis" }, { name = "flake8" }, - { name = "flake8-black" }, { name = "hypothesis" }, { name = "isort" }, { name = "mock" }, @@ -271,6 +269,7 @@ dev = [ { name = "pytest-cov" }, { name = "pytest-responses" }, { name = "pytest-xdist" }, + { name = "ruff" }, { name = "tox" }, { name = "tox-uv" }, ] @@ -315,12 +314,10 @@ requires-dist = [ [package.metadata.requires-dev] dev = [ - { name = "black", specifier = "<26.1.0" }, { name = "coverage" }, { name = "coveralls" }, { name = "fakeredis" }, { name = "flake8" }, - { name = "flake8-black" }, { name = "hypothesis", specifier = "<6.150.0" }, { name = "isort" }, { name = "mock" }, @@ -329,6 +326,7 @@ dev = [ { name = "pytest-cov" }, { name = "pytest-responses" }, { name = "pytest-xdist" }, + { name = "ruff" }, { name = "tox" }, { name = "tox-uv" }, ] @@ -348,7 +346,6 @@ dependencies = [ [package.dev-dependencies] dev = [ - { name = "black" }, { name = "coverage" }, { name = "flake8" }, { name = "isort" }, @@ -356,6 +353,7 @@ dev = [ { name = "pytest-asyncio" }, { name = "pytest-cov" }, { name = "pytest-xdist" }, + { name = "ruff" }, { name = "tox" }, { name = "tox-uv" }, { name = "yarl" }, @@ -369,7 +367,6 @@ requires-dist = [ [package.metadata.requires-dev] dev = [ - { name = "black" }, { name = "coverage" }, { name = "flake8" }, { name = "isort" }, @@ -377,38 +374,12 @@ dev = [ { name = "pytest-asyncio" }, { name = "pytest-cov" }, { name = "pytest-xdist" }, + { name = "ruff" }, { name = "tox" }, { name = "tox-uv" }, { name = "yarl" }, ] -[[package]] -name = "black" -version = "25.12.0" -source = { registry = "https://pypi.org/simple" } -dependencies = [ - { name = "click" }, - { name = "mypy-extensions" }, - { name = "packaging" }, - { name = "pathspec" }, - { name = "platformdirs" }, - { name = "pytokens" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/c4/d9/07b458a3f1c525ac392b5edc6b191ff140b596f9d77092429417a54e249d/black-25.12.0.tar.gz", hash = "sha256:8d3dd9cea14bff7ddc0eb243c811cdb1a011ebb4800a5f0335a01a68654796a7", size = 659264, upload-time = "2025-12-08T01:40:52.501Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/c8/52/c551e36bc95495d2aa1a37d50566267aa47608c81a53f91daa809e03293f/black-25.12.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:a05ddeb656534c3e27a05a29196c962877c83fa5503db89e68857d1161ad08a5", size = 1923809, upload-time = "2025-12-08T01:46:55.126Z" }, - { url = "https://files.pythonhosted.org/packages/a0/f7/aac9b014140ee56d247e707af8db0aae2e9efc28d4a8aba92d0abd7ae9d1/black-25.12.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:9ec77439ef3e34896995503865a85732c94396edcc739f302c5673a2315e1e7f", size = 1742384, upload-time = "2025-12-08T01:49:37.022Z" }, - { url = "https://files.pythonhosted.org/packages/74/98/38aaa018b2ab06a863974c12b14a6266badc192b20603a81b738c47e902e/black-25.12.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:0e509c858adf63aa61d908061b52e580c40eae0dfa72415fa47ac01b12e29baf", size = 1798761, upload-time = "2025-12-08T01:46:05.386Z" }, - { url = "https://files.pythonhosted.org/packages/16/3a/a8ac542125f61574a3f015b521ca83b47321ed19bb63fe6d7560f348bfe1/black-25.12.0-cp313-cp313-win_amd64.whl", hash = "sha256:252678f07f5bac4ff0d0e9b261fbb029fa530cfa206d0a636a34ab445ef8ca9d", size = 1429180, upload-time = "2025-12-08T01:45:34.903Z" }, - { url = "https://files.pythonhosted.org/packages/e6/2d/bdc466a3db9145e946762d52cd55b1385509d9f9004fec1c97bdc8debbfb/black-25.12.0-cp313-cp313-win_arm64.whl", hash = "sha256:bc5b1c09fe3c931ddd20ee548511c64ebf964ada7e6f0763d443947fd1c603ce", size = 1239350, upload-time = "2025-12-08T01:46:09.458Z" }, - { url = "https://files.pythonhosted.org/packages/35/46/1d8f2542210c502e2ae1060b2e09e47af6a5e5963cb78e22ec1a11170b28/black-25.12.0-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:0a0953b134f9335c2434864a643c842c44fba562155c738a2a37a4d61f00cad5", size = 1917015, upload-time = "2025-12-08T01:53:27.987Z" }, - { url = "https://files.pythonhosted.org/packages/41/37/68accadf977672beb8e2c64e080f568c74159c1aaa6414b4cd2aef2d7906/black-25.12.0-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:2355bbb6c3b76062870942d8cc450d4f8ac71f9c93c40122762c8784df49543f", size = 1741830, upload-time = "2025-12-08T01:54:36.861Z" }, - { url = "https://files.pythonhosted.org/packages/ac/76/03608a9d8f0faad47a3af3a3c8c53af3367f6c0dd2d23a84710456c7ac56/black-25.12.0-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:9678bd991cc793e81d19aeeae57966ee02909877cb65838ccffef24c3ebac08f", size = 1791450, upload-time = "2025-12-08T01:44:52.581Z" }, - { url = "https://files.pythonhosted.org/packages/06/99/b2a4bd7dfaea7964974f947e1c76d6886d65fe5d24f687df2d85406b2609/black-25.12.0-cp314-cp314-win_amd64.whl", hash = "sha256:97596189949a8aad13ad12fcbb4ae89330039b96ad6742e6f6b45e75ad5cfd83", size = 1452042, upload-time = "2025-12-08T01:46:13.188Z" }, - { url = "https://files.pythonhosted.org/packages/b2/7c/d9825de75ae5dd7795d007681b752275ea85a1c5d83269b4b9c754c2aaab/black-25.12.0-cp314-cp314-win_arm64.whl", hash = "sha256:778285d9ea197f34704e3791ea9404cd6d07595745907dd2ce3da7a13627b29b", size = 1267446, upload-time = "2025-12-08T01:46:14.497Z" }, - { url = "https://files.pythonhosted.org/packages/68/11/21331aed19145a952ad28fca2756a1433ee9308079bd03bd898e903a2e53/black-25.12.0-py3-none-any.whl", hash = "sha256:48ceb36c16dbc84062740049eef990bb2ce07598272e673c17d1a7720c71c828", size = 206191, upload-time = "2025-12-08T01:40:50.963Z" }, -] - [[package]] name = "blinker" version = "1.9.0" @@ -834,19 +805,6 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/9f/56/13ab06b4f93ca7cac71078fbe37fcea175d3216f31f85c3168a6bbd0bb9a/flake8-7.3.0-py2.py3-none-any.whl", hash = "sha256:b9696257b9ce8beb888cdbe31cf885c90d31928fe202be0889a7cdafad32f01e", size = 57922, upload-time = "2025-06-20T19:31:34.425Z" }, ] -[[package]] -name = "flake8-black" -version = "0.4.0" -source = { registry = "https://pypi.org/simple" } -dependencies = [ - { name = "black" }, - { name = "flake8" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/d6/c5/99d47b42d31cb820b81f9aa86c63eb6221a1a23e7b3d15e6d528a17457d7/flake8_black-0.4.0.tar.gz", hash = "sha256:bf226868f695dee48d55ff6d7747e900709bfd6f605b7a378c70e711e3fc26cb", size = 13706, upload-time = "2025-09-21T18:56:37.822Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/85/b0/692cb58998c21c0f2348bd128171173455515b164be89bec195eeb8c5d8a/flake8_black-0.4.0-py3-none-any.whl", hash = "sha256:288762d0c9ea065782d87eeecbcc20c69079d17fe1d0f0445f0eb0b0ffb80c39", size = 10145, upload-time = "2025-09-21T18:56:36.597Z" }, -] - [[package]] name = "flask" version = "3.1.3" @@ -1461,15 +1419,6 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/81/08/7036c080d7117f28a4af526d794aab6a84463126db031b007717c1a6676e/multidict-6.7.1-py3-none-any.whl", hash = "sha256:55d97cc6dae627efa6a6e548885712d4864b81110ac76fa4e534c03819fa4a56", size = 12319, upload-time = "2026-01-26T02:46:44.004Z" }, ] -[[package]] -name = "mypy-extensions" -version = "1.1.0" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/a2/6e/371856a3fb9d31ca8dac321cda606860fa4548858c0cc45d9d1d4ca2628b/mypy_extensions-1.1.0.tar.gz", hash = "sha256:52e68efc3284861e772bbcd66823fde5ae21fd2fdb51c62a211403730b916558", size = 6343, upload-time = "2025-04-22T14:54:24.164Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/79/7b/2c79738432f5c924bef5071f933bcc9efd0473bac3b4aa584a6f7c1c8df8/mypy_extensions-1.1.0-py3-none-any.whl", hash = "sha256:1be4cccdb0f2482337c4743e60421de3a356cd97508abadd57d47403e94f5505", size = 4963, upload-time = "2025-04-22T14:54:22.983Z" }, -] - [[package]] name = "mysqlclient" version = "2.2.8" @@ -1528,15 +1477,6 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/b7/b9/c538f279a4e237a006a2c98387d081e9eb060d203d8ed34467cc0f0b9b53/packaging-26.0-py3-none-any.whl", hash = "sha256:b36f1fef9334a5588b4166f8bcd26a14e521f2b55e6b9de3aaa80d3ff7a37529", size = 74366, upload-time = "2026-01-21T20:50:37.788Z" }, ] -[[package]] -name = "pathspec" -version = "1.0.4" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/fa/36/e27608899f9b8d4dff0617b2d9ab17ca5608956ca44461ac14ac48b44015/pathspec-1.0.4.tar.gz", hash = "sha256:0210e2ae8a21a9137c0d470578cb0e595af87edaa6ebf12ff176f14a02e0e645", size = 131200, upload-time = "2026-01-27T03:59:46.938Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/ef/3c/2c197d226f9ea224a9ab8d197933f9da0ae0aac5b6e0f884e2b8d9c8e9f7/pathspec-1.0.4-py3-none-any.whl", hash = "sha256:fb6ae2fd4e7c921a165808a552060e722767cfa526f99ca5156ed2ce45a5c723", size = 55206, upload-time = "2026-01-27T03:59:45.137Z" }, -] - [[package]] name = "pbr" version = "7.0.3" @@ -1929,30 +1869,6 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/1b/d0/397f9626e711ff749a95d96b7af99b9c566a9bb5129b8e4c10fc4d100304/python_multipart-0.0.22-py3-none-any.whl", hash = "sha256:2b2cd894c83d21bf49d702499531c7bafd057d730c201782048f7945d82de155", size = 24579, upload-time = "2026-01-25T10:15:54.811Z" }, ] -[[package]] -name = "pytokens" -version = "0.4.1" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/b6/34/b4e015b99031667a7b960f888889c5bd34ef585c85e1cb56a594b92836ac/pytokens-0.4.1.tar.gz", hash = "sha256:292052fe80923aae2260c073f822ceba21f3872ced9a68bb7953b348e561179a", size = 23015, upload-time = "2026-01-30T01:03:45.924Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/cb/dc/08b1a080372afda3cceb4f3c0a7ba2bde9d6a5241f1edb02a22a019ee147/pytokens-0.4.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:8bdb9d0ce90cbf99c525e75a2fa415144fd570a1ba987380190e8b786bc6ef9b", size = 160720, upload-time = "2026-01-30T01:03:13.843Z" }, - { url = "https://files.pythonhosted.org/packages/64/0c/41ea22205da480837a700e395507e6a24425151dfb7ead73343d6e2d7ffe/pytokens-0.4.1-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:5502408cab1cb18e128570f8d598981c68a50d0cbd7c61312a90507cd3a1276f", size = 254204, upload-time = "2026-01-30T01:03:14.886Z" }, - { url = "https://files.pythonhosted.org/packages/e0/d2/afe5c7f8607018beb99971489dbb846508f1b8f351fcefc225fcf4b2adc0/pytokens-0.4.1-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:29d1d8fb1030af4d231789959f21821ab6325e463f0503a61d204343c9b355d1", size = 268423, upload-time = "2026-01-30T01:03:15.936Z" }, - { url = "https://files.pythonhosted.org/packages/68/d4/00ffdbd370410c04e9591da9220a68dc1693ef7499173eb3e30d06e05ed1/pytokens-0.4.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:970b08dd6b86058b6dc07efe9e98414f5102974716232d10f32ff39701e841c4", size = 266859, upload-time = "2026-01-30T01:03:17.458Z" }, - { url = "https://files.pythonhosted.org/packages/a7/c9/c3161313b4ca0c601eeefabd3d3b576edaa9afdefd32da97210700e47652/pytokens-0.4.1-cp313-cp313-win_amd64.whl", hash = "sha256:9bd7d7f544d362576be74f9d5901a22f317efc20046efe2034dced238cbbfe78", size = 103520, upload-time = "2026-01-30T01:03:18.652Z" }, - { url = "https://files.pythonhosted.org/packages/8f/a7/b470f672e6fc5fee0a01d9e75005a0e617e162381974213a945fcd274843/pytokens-0.4.1-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:4a14d5f5fc78ce85e426aa159489e2d5961acf0e47575e08f35584009178e321", size = 160821, upload-time = "2026-01-30T01:03:19.684Z" }, - { url = "https://files.pythonhosted.org/packages/80/98/e83a36fe8d170c911f864bfded690d2542bfcfacb9c649d11a9e6eb9dc41/pytokens-0.4.1-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:97f50fd18543be72da51dd505e2ed20d2228c74e0464e4262e4899797803d7fa", size = 254263, upload-time = "2026-01-30T01:03:20.834Z" }, - { url = "https://files.pythonhosted.org/packages/0f/95/70d7041273890f9f97a24234c00b746e8da86df462620194cef1d411ddeb/pytokens-0.4.1-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:dc74c035f9bfca0255c1af77ddd2d6ae8419012805453e4b0e7513e17904545d", size = 268071, upload-time = "2026-01-30T01:03:21.888Z" }, - { url = "https://files.pythonhosted.org/packages/da/79/76e6d09ae19c99404656d7db9c35dfd20f2086f3eb6ecb496b5b31163bad/pytokens-0.4.1-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:f66a6bbe741bd431f6d741e617e0f39ec7257ca1f89089593479347cc4d13324", size = 271716, upload-time = "2026-01-30T01:03:23.633Z" }, - { url = "https://files.pythonhosted.org/packages/79/37/482e55fa1602e0a7ff012661d8c946bafdc05e480ea5a32f4f7e336d4aa9/pytokens-0.4.1-cp314-cp314-win_amd64.whl", hash = "sha256:b35d7e5ad269804f6697727702da3c517bb8a5228afa450ab0fa787732055fc9", size = 104539, upload-time = "2026-01-30T01:03:24.788Z" }, - { url = "https://files.pythonhosted.org/packages/30/e8/20e7db907c23f3d63b0be3b8a4fd1927f6da2395f5bcc7f72242bb963dfe/pytokens-0.4.1-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:8fcb9ba3709ff77e77f1c7022ff11d13553f3c30299a9fe246a166903e9091eb", size = 168474, upload-time = "2026-01-30T01:03:26.428Z" }, - { url = "https://files.pythonhosted.org/packages/d6/81/88a95ee9fafdd8f5f3452107748fd04c24930d500b9aba9738f3ade642cc/pytokens-0.4.1-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:79fc6b8699564e1f9b521582c35435f1bd32dd06822322ec44afdeba666d8cb3", size = 290473, upload-time = "2026-01-30T01:03:27.415Z" }, - { url = "https://files.pythonhosted.org/packages/cf/35/3aa899645e29b6375b4aed9f8d21df219e7c958c4c186b465e42ee0a06bf/pytokens-0.4.1-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:d31b97b3de0f61571a124a00ffe9a81fb9939146c122c11060725bd5aea79975", size = 303485, upload-time = "2026-01-30T01:03:28.558Z" }, - { url = "https://files.pythonhosted.org/packages/52/a0/07907b6ff512674d9b201859f7d212298c44933633c946703a20c25e9d81/pytokens-0.4.1-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:967cf6e3fd4adf7de8fc73cd3043754ae79c36475c1c11d514fc72cf5490094a", size = 306698, upload-time = "2026-01-30T01:03:29.653Z" }, - { url = "https://files.pythonhosted.org/packages/39/2a/cbbf9250020a4a8dd53ba83a46c097b69e5eb49dd14e708f496f548c6612/pytokens-0.4.1-cp314-cp314t-win_amd64.whl", hash = "sha256:584c80c24b078eec1e227079d56dc22ff755e0ba8654d8383b2c549107528918", size = 116287, upload-time = "2026-01-30T01:03:30.912Z" }, - { url = "https://files.pythonhosted.org/packages/c6/78/397db326746f0a342855b81216ae1f0a32965deccfd7c830a2dbc66d2483/pytokens-0.4.1-py3-none-any.whl", hash = "sha256:26cef14744a8385f35d0e095dc8b3a7583f6c953c2e3d269c7f82484bf5ad2de", size = 13729, upload-time = "2026-01-30T01:03:45.029Z" }, -] - [[package]] name = "pyyaml" version = "6.0.3" @@ -2162,6 +2078,31 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/64/8d/0133e4eb4beed9e425d9a98ed6e081a55d195481b7632472be1af08d2f6b/rsa-4.9.1-py3-none-any.whl", hash = "sha256:68635866661c6836b8d39430f97a996acbd61bfa49406748ea243539fe239762", size = 34696, upload-time = "2025-04-16T09:51:17.142Z" }, ] +[[package]] +name = "ruff" +version = "0.15.6" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/51/df/f8629c19c5318601d3121e230f74cbee7a3732339c52b21daa2b82ef9c7d/ruff-0.15.6.tar.gz", hash = "sha256:8394c7bb153a4e3811a4ecdacd4a8e6a4fa8097028119160dffecdcdf9b56ae4", size = 4597916, upload-time = "2026-03-12T23:05:47.51Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/9e/2f/4e03a7e5ce99b517e98d3b4951f411de2b0fa8348d39cf446671adcce9a2/ruff-0.15.6-py3-none-linux_armv6l.whl", hash = "sha256:7c98c3b16407b2cf3d0f2b80c80187384bc92c6774d85fefa913ecd941256fff", size = 10508953, upload-time = "2026-03-12T23:05:17.246Z" }, + { url = "https://files.pythonhosted.org/packages/70/60/55bcdc3e9f80bcf39edf0cd272da6fa511a3d94d5a0dd9e0adf76ceebdb4/ruff-0.15.6-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:ee7dcfaad8b282a284df4aa6ddc2741b3f4a18b0555d626805555a820ea181c3", size = 10942257, upload-time = "2026-03-12T23:05:23.076Z" }, + { url = "https://files.pythonhosted.org/packages/e7/f9/005c29bd1726c0f492bfa215e95154cf480574140cb5f867c797c18c790b/ruff-0.15.6-py3-none-macosx_11_0_arm64.whl", hash = "sha256:3bd9967851a25f038fc8b9ae88a7fbd1b609f30349231dffaa37b6804923c4bb", size = 10322683, upload-time = "2026-03-12T23:05:33.738Z" }, + { url = "https://files.pythonhosted.org/packages/5f/74/2f861f5fd7cbb2146bddb5501450300ce41562da36d21868c69b7a828169/ruff-0.15.6-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:13f4594b04e42cd24a41da653886b04d2ff87adbf57497ed4f728b0e8a4866f8", size = 10660986, upload-time = "2026-03-12T23:05:53.245Z" }, + { url = "https://files.pythonhosted.org/packages/c1/a1/309f2364a424eccb763cdafc49df843c282609f47fe53aa83f38272389e0/ruff-0.15.6-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:e2ed8aea2f3fe57886d3f00ea5b8aae5bf68d5e195f487f037a955ff9fbaac9e", size = 10332177, upload-time = "2026-03-12T23:05:56.145Z" }, + { url = "https://files.pythonhosted.org/packages/30/41/7ebf1d32658b4bab20f8ac80972fb19cd4e2c6b78552be263a680edc55ac/ruff-0.15.6-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:70789d3e7830b848b548aae96766431c0dc01a6c78c13381f423bf7076c66d15", size = 11170783, upload-time = "2026-03-12T23:06:01.742Z" }, + { url = "https://files.pythonhosted.org/packages/76/be/6d488f6adca047df82cd62c304638bcb00821c36bd4881cfca221561fdfc/ruff-0.15.6-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:542aaf1de3154cea088ced5a819ce872611256ffe2498e750bbae5247a8114e9", size = 12044201, upload-time = "2026-03-12T23:05:28.697Z" }, + { url = "https://files.pythonhosted.org/packages/71/68/e6f125df4af7e6d0b498f8d373274794bc5156b324e8ab4bf5c1b4fc0ec7/ruff-0.15.6-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:1c22e6f02c16cfac3888aa636e9eba857254d15bbacc9906c9689fdecb1953ab", size = 11421561, upload-time = "2026-03-12T23:05:31.236Z" }, + { url = "https://files.pythonhosted.org/packages/f1/9f/f85ef5fd01a52e0b472b26dc1b4bd228b8f6f0435975442ffa4741278703/ruff-0.15.6-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:98893c4c0aadc8e448cfa315bd0cc343a5323d740fe5f28ef8a3f9e21b381f7e", size = 11310928, upload-time = "2026-03-12T23:05:45.288Z" }, + { url = "https://files.pythonhosted.org/packages/8c/26/b75f8c421f5654304b89471ed384ae8c7f42b4dff58fa6ce1626d7f2b59a/ruff-0.15.6-py3-none-manylinux_2_31_riscv64.whl", hash = "sha256:70d263770d234912374493e8cc1e7385c5d49376e41dfa51c5c3453169dc581c", size = 11235186, upload-time = "2026-03-12T23:05:50.677Z" }, + { url = "https://files.pythonhosted.org/packages/fc/d4/d5a6d065962ff7a68a86c9b4f5500f7d101a0792078de636526c0edd40da/ruff-0.15.6-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:55a1ad63c5a6e54b1f21b7514dfadc0c7fb40093fa22e95143cf3f64ebdcd512", size = 10635231, upload-time = "2026-03-12T23:05:37.044Z" }, + { url = "https://files.pythonhosted.org/packages/d6/56/7c3acf3d50910375349016cf33de24be021532042afbed87942858992491/ruff-0.15.6-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:8dc473ba093c5ec238bb1e7429ee676dca24643c471e11fbaa8a857925b061c0", size = 10340357, upload-time = "2026-03-12T23:06:04.748Z" }, + { url = "https://files.pythonhosted.org/packages/06/54/6faa39e9c1033ff6a3b6e76b5df536931cd30caf64988e112bbf91ef5ce5/ruff-0.15.6-py3-none-musllinux_1_2_i686.whl", hash = "sha256:85b042377c2a5561131767974617006f99f7e13c63c111b998f29fc1e58a4cfb", size = 10860583, upload-time = "2026-03-12T23:05:58.978Z" }, + { url = "https://files.pythonhosted.org/packages/cb/1e/509a201b843b4dfb0b32acdedf68d951d3377988cae43949ba4c4133a96a/ruff-0.15.6-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:cef49e30bc5a86a6a92098a7fbf6e467a234d90b63305d6f3ec01225a9d092e0", size = 11410976, upload-time = "2026-03-12T23:05:39.955Z" }, + { url = "https://files.pythonhosted.org/packages/6c/25/3fc9114abf979a41673ce877c08016f8e660ad6cf508c3957f537d2e9fa9/ruff-0.15.6-py3-none-win32.whl", hash = "sha256:bbf67d39832404812a2d23020dda68fee7f18ce15654e96fb1d3ad21a5fe436c", size = 10616872, upload-time = "2026-03-12T23:05:42.451Z" }, + { url = "https://files.pythonhosted.org/packages/89/7a/09ece68445ceac348df06e08bf75db72d0e8427765b96c9c0ffabc1be1d9/ruff-0.15.6-py3-none-win_amd64.whl", hash = "sha256:aee25bc84c2f1007ecb5037dff75cef00414fdf17c23f07dc13e577883dca406", size = 11787271, upload-time = "2026-03-12T23:05:20.168Z" }, + { url = "https://files.pythonhosted.org/packages/7f/d0/578c47dd68152ddddddf31cd7fc67dc30b7cdf639a86275fda821b0d9d98/ruff-0.15.6-py3-none-win_arm64.whl", hash = "sha256:c34de3dd0b0ba203be50ae70f5910b17188556630e2178fd7d79fc030eb0d837", size = 11060497, upload-time = "2026-03-12T23:05:25.968Z" }, +] + [[package]] name = "sentry-sdk" version = "2.54.0"