From 2696c0c1cfb5ff81f6d479e0006815d54e5a1a6f Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Wed, 14 Oct 2026 20:35:28 -0500 Subject: [PATCH] PYTHON-6164 Exclude drivers-evergreen-tools from linting, drop stale ruff target-version --- .pre-commit-config.yaml | 1 + pyproject.toml | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index d15ce194d4..c1053779ce 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,3 +1,4 @@ +exclude: ^drivers-evergreen-tools/ repos: - repo: https://github.com/pre-commit/pre-commit-hooks diff --git a/pyproject.toml b/pyproject.toml index 56b932efdc..dd97ab5d76 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -189,8 +189,8 @@ warn_unused_ignores = false disable_error_code = ["unused-coroutine", "no-redef"] [tool.ruff] -target-version = "py39" line-length = 100 +extend-exclude = ["drivers-evergreen-tools"] [tool.ruff.lint] select = [ @@ -241,6 +241,12 @@ ignore = [ "SIM117", # Use a single `with` statement with multiple contexts instead of nested `with` statements "UP045", # Use `X | Y` for union annotation (Enable when we drop 3.9 support) "PLC0415", # `import` should be at the top-level of a file + "UP035", # Deprecated import (e.g. `typing.Callable` instead of `collections.abc.Callable`) + "UP041", # `asyncio.TimeoutError` is an alias of `TimeoutError` on 3.11+ + "ASYNC109", # Async function with a `timeout` parameter (CSOT timeouts are not `asyncio.timeout`) + "UP042", # `str, Enum` should be `StrEnum` (changes `__str__` semantics) + "UP017", # `timezone.utc` preferred over `datetime.UTC` (keep existing style) + "B905", # `zip()` without an explicit `strict=` parameter ] unfixable = [ "RUF100", # Unused noqa