diff --git a/pyproject.toml b/pyproject.toml index ae29fdaf8e..a15f51d46d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -247,7 +247,6 @@ ignore = [ "ICN001", # Use standard import naming conventions (pandas as pd, datetime as dt...) "BLE", # Broad `Except` exception catches (intentional) # These are all new defaults added in ruff 0.16.0. Individual tickets linked from PYTHON-5964 track enabling each one. - "FURB", # refurb "TC", # flake8-type-checking "TRY", # tryceratops "INT", # flake8-gettext diff --git a/test/asynchronous/test_async_loop_unblocked.py b/test/asynchronous/test_async_loop_unblocked.py index 7f3f97ae44..65b8027d62 100644 --- a/test/asynchronous/test_async_loop_unblocked.py +++ b/test/asynchronous/test_async_loop_unblocked.py @@ -51,7 +51,7 @@ async def background_task(): await t self.assertLessEqual( - sorted(latencies, reverse=True)[0], + max(latencies), 1.0, "Background task was blocked from running", ) diff --git a/tools/synchro.py b/tools/synchro.py index 4d2f865479..f5b6260b5d 100644 --- a/tools/synchro.py +++ b/tools/synchro.py @@ -418,14 +418,15 @@ def main() -> None: for f in generated_files: print(f" {f}") - subprocess.run( # noqa: S603 - [sys.executable, "-m", "ruff", "check", *generated_files, "--fix", *ruff_extra], - check=is_ci, - ) - subprocess.run( # noqa: S603 - [sys.executable, "-m", "ruff", "format", *generated_files, *ruff_extra], - check=is_ci, - ) + if generated_files: + subprocess.run( # noqa: S603 + [sys.executable, "-m", "ruff", "check", *generated_files, "--fix", *ruff_extra], + check=is_ci, + ) + subprocess.run( # noqa: S603 + [sys.executable, "-m", "ruff", "format", *generated_files, *ruff_extra], + check=is_ci, + ) if is_ci and generated_files: result = subprocess.run( # noqa: S603