From 5a71da3f4484488f1c761de5caeb56adbd751847 Mon Sep 17 00:00:00 2001 From: Chris Burroughs Date: Wed, 17 Sep 2025 16:51:46 -0400 Subject: [PATCH 1/2] update to ruff 0.13.0 Announced at https://astral.sh/blog/ruff-v0.13.0 --- docs/notes/2.30.x.md | 2 ++ src/python/pants/backend/python/lint/ruff/subsystem.py | 6 +++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/docs/notes/2.30.x.md b/docs/notes/2.30.x.md index da88a0f53c0..da4ba2fea2e 100644 --- a/docs/notes/2.30.x.md +++ b/docs/notes/2.30.x.md @@ -28,6 +28,8 @@ The deprecation period for the `experimental_test_shell_command` alias has expir #### Python +The Ruff tool has been upgraded from 0.12.5 to [0.13.0](https://astral.sh/blog/ruff-v0.13.0) by default. + #### Javascript #### TypeScript diff --git a/src/python/pants/backend/python/lint/ruff/subsystem.py b/src/python/pants/backend/python/lint/ruff/subsystem.py index c010909762c..c4f70f89371 100644 --- a/src/python/pants/backend/python/lint/ruff/subsystem.py +++ b/src/python/pants/backend/python/lint/ruff/subsystem.py @@ -37,8 +37,12 @@ class Ruff(TemplatedExternalTool): name = "Ruff" help = "The Ruff Python formatter (https://github.com/astral-sh/ruff)." - default_version = "0.12.5" + default_version = "0.13.0" default_known_versions = [ + "0.13.0|macos_x86_64|ac47ad1ac90f3070c064d2f5fceef4fe609fec7c073fd29d0814ed126c492e6d|12924617", + "0.13.0|macos_arm64|0d706798534537b6655b79fd95c2955c0a0013d4c54d36679d3306825a6bd6aa|12098971", + "0.13.0|linux_x86_64|b56ac90cc6987401bafdcf1b931ef044074c5b9451286afa4606a983f64f4fdd|13437622", + "0.13.0|linux_arm64|bdee6f1376470b74b1dc5ed48eca52ec9c3e4512bd7f3204e0df100f0bed4741|12137114", "0.12.5|macos_x86_64|5af0b2931581a5ed91743c9f669c23cb0db9bb1f0c49f8695ad1443dbc6a9e50|12478716", "0.12.5|macos_arm64|8819b61cff645c1d1671df331bb57c1ab230094b686942bccedde1f888feb522|11719060", "0.12.5|linux_x86_64|79beb4eac07beaea24774709eeb88a87115f1b53f857dcc1155431e642e01ade|12995071", From e2a166c0b87b16efe92720a658636c13548354b4 Mon Sep 17 00:00:00 2001 From: Chris Burroughs Date: Thu, 18 Sep 2025 11:13:48 -0400 Subject: [PATCH 2/2] adjust output test --- .../pants/backend/python/lint/ruff/rules_integration_test.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/python/pants/backend/python/lint/ruff/rules_integration_test.py b/src/python/pants/backend/python/lint/ruff/rules_integration_test.py index 531b03a379f..1f6ad680506 100644 --- a/src/python/pants/backend/python/lint/ruff/rules_integration_test.py +++ b/src/python/pants/backend/python/lint/ruff/rules_integration_test.py @@ -308,4 +308,5 @@ def test_report_file(rule_runner: RuleRunner) -> None: assert lint_result.exit_code == 1 report_files = rule_runner.request(DigestContents, [lint_result.report]) assert len(report_files) == 1 - assert "f.py:1:5: F541" in report_files[0].content.decode() + assert "f.py:1:5" in report_files[0].content.decode() + assert "F541" in report_files[0].content.decode()