From df2ca686b2665a6755536bae15220a0453b437d2 Mon Sep 17 00:00:00 2001 From: Noah Stapp Date: Mon, 9 Nov 2026 14:56:57 -0500 Subject: [PATCH] PYTHON-5964 Adopt ruff 0.17 default rule set in addition to existing rule sets --- .evergreen/scripts/setup_tests.py | 2 +- .evergreen/scripts/utils.py | 2 +- .github/copilot-instructions.md | 1 + bson/binary.py | 6 +-- bson/code.py | 4 +- bson/codec_options.py | 2 +- bson/datetime_ms.py | 4 +- bson/dbref.py | 4 +- bson/decimal128.py | 4 +- bson/json_util.py | 12 +++--- bson/max_key.py | 4 +- bson/min_key.py | 4 +- bson/objectid.py | 4 +- bson/raw_bson.py | 2 +- bson/regex.py | 4 +- bson/son.py | 6 +-- bson/timestamp.py | 4 +- pymongo/asynchronous/auth_oidc.py | 2 +- pymongo/asynchronous/collection.py | 4 +- pymongo/asynchronous/database.py | 4 +- pymongo/asynchronous/mongo_client.py | 4 +- pymongo/collation.py | 4 +- pymongo/common.py | 4 +- pymongo/message.py | 6 +-- pymongo/operations.py | 42 +++++++++++---------- pymongo/pool_shared.py | 6 +-- pymongo/read_concern.py | 2 +- pymongo/read_preferences.py | 6 +-- pymongo/server_description.py | 4 +- pymongo/synchronous/auth_oidc.py | 2 +- pymongo/synchronous/collection.py | 4 +- pymongo/synchronous/database.py | 4 +- pymongo/synchronous/mongo_client.py | 4 +- pymongo/write_concern.py | 4 +- pyproject.toml | 21 +++++++++-- test/asynchronous/test_client.py | 2 +- test/asynchronous/test_database.py | 2 +- test/test_bson.py | 23 +++++++----- test/test_client.py | 2 +- test/test_database.py | 2 +- test/test_json_util.py | 12 +++--- test/test_typing.py | 4 +- tools/ensure_future_annotations_import.py | 2 +- uv.lock | 46 +++++++++++------------ 44 files changed, 157 insertions(+), 134 deletions(-) diff --git a/.evergreen/scripts/setup_tests.py b/.evergreen/scripts/setup_tests.py index bfa767e342..5e9a8329d1 100644 --- a/.evergreen/scripts/setup_tests.py +++ b/.evergreen/scripts/setup_tests.py @@ -71,7 +71,7 @@ def get_distro() -> Distro: version_id = "" arch = platform.machine() with open("/etc/os-release") as fid: - for line in fid.readlines(): + for line in fid: line = line.replace('"', "") # noqa: PLW2901 if line.startswith("NAME="): _, _, name = line.strip().partition("=") diff --git a/.evergreen/scripts/utils.py b/.evergreen/scripts/utils.py index 5b7da0f5a3..e9bc77b1ee 100644 --- a/.evergreen/scripts/utils.py +++ b/.evergreen/scripts/utils.py @@ -281,7 +281,7 @@ def handle_env_overrides(parser: argparse.ArgumentParser, opts: argparse.Namespa def read_env(path: Path | str) -> dict[str, str]: config = dict() with Path(path).open() as fid: - for line in fid.readlines(): + for line in fid: if "=" not in line: continue name, _, value = line.strip().partition("=") diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index 6023350f5c..17f517f8b8 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -38,6 +38,7 @@ if user.email and "@" in user.email and len(user.email) > 5: else: submit_button.enabled = False + # Consider: def valid_email(email): return email and "@" in email and len(email) > 5 diff --git a/bson/binary.py b/bson/binary.py index 5731a489eb..7814bf49fb 100644 --- a/bson/binary.py +++ b/bson/binary.py @@ -260,7 +260,7 @@ def __init__( def __repr__(self) -> str: return f"BinaryVector(dtype={self.dtype}, padding={self.padding}, data={self.data})" - def __eq__(self, other: Any) -> bool: + def __eq__(self, other: object) -> bool: if not isinstance(other, BinaryVector): return False return ( @@ -648,7 +648,7 @@ def __getnewargs__(self) -> tuple[bytes, int]: # type: ignore[override] data = data.encode("latin-1") return data, self.__subtype - def __eq__(self, other: Any) -> bool: + def __eq__(self, other: object) -> bool: if isinstance(other, Binary): return (self.__subtype, bytes(self)) == (other.subtype, bytes(other)) # We don't return NotImplemented here because if we did then @@ -659,7 +659,7 @@ def __eq__(self, other: Any) -> bool: def __hash__(self) -> int: return super().__hash__() ^ hash(self.__subtype) - def __ne__(self, other: Any) -> bool: + def __ne__(self, other: object) -> bool: return not self == other def __repr__(self) -> str: diff --git a/bson/code.py b/bson/code.py index d74090f79b..4c0289cada 100644 --- a/bson/code.py +++ b/bson/code.py @@ -91,12 +91,12 @@ def scope(self) -> Mapping[str, Any] | None: def __repr__(self) -> str: return f"Code({str.__repr__(self)}, {self.__scope!r})" - def __eq__(self, other: Any) -> bool: + def __eq__(self, other: object) -> bool: if isinstance(other, Code): return (self.__scope, str(self)) == (other.__scope, str(other)) return False __hash__: Any = None - def __ne__(self, other: Any) -> bool: + def __ne__(self, other: object) -> bool: return not self == other diff --git a/bson/codec_options.py b/bson/codec_options.py index 017d7cf8fa..662665f961 100644 --- a/bson/codec_options.py +++ b/bson/codec_options.py @@ -183,7 +183,7 @@ def _validate_type_encoder(self, codec: _Codec) -> None: def __repr__(self) -> str: return f"{self.__class__.__name__}(type_codecs={self.__type_codecs!r}, fallback_encoder={self._fallback_encoder!r})" - def __eq__(self, other: Any) -> Any: + def __eq__(self, other: object) -> Any: if not isinstance(other, type(self)): return NotImplemented return ( diff --git a/bson/datetime_ms.py b/bson/datetime_ms.py index 698bee1a45..d82ad9d1cb 100644 --- a/bson/datetime_ms.py +++ b/bson/datetime_ms.py @@ -80,12 +80,12 @@ def __lt__(self, other: DatetimeMS | int) -> bool: def __le__(self, other: DatetimeMS | int) -> bool: return self._value <= other - def __eq__(self, other: Any) -> bool: + def __eq__(self, other: object) -> bool: if isinstance(other, DatetimeMS): return self._value == other._value return False - def __ne__(self, other: Any) -> bool: + def __ne__(self, other: object) -> bool: if isinstance(other, DatetimeMS): return self._value != other._value return True diff --git a/bson/dbref.py b/bson/dbref.py index e8b8f18dfa..01ecfe6a14 100644 --- a/bson/dbref.py +++ b/bson/dbref.py @@ -109,14 +109,14 @@ def __repr__(self) -> str: return f"DBRef({self.collection!r}, {self.id!r}{extra})" return f"DBRef({self.collection!r}, {self.id!r}, {self.database!r}{extra})" - def __eq__(self, other: Any) -> bool: + def __eq__(self, other: object) -> bool: if isinstance(other, DBRef): us = (self.__database, self.__collection, self.__id, self.__kwargs) them = (other.__database, other.__collection, other.__id, other.__kwargs) return us == them return NotImplemented - def __ne__(self, other: Any) -> bool: + def __ne__(self, other: object) -> bool: return not self == other def __hash__(self) -> int: diff --git a/bson/decimal128.py b/bson/decimal128.py index 533b75d040..1e62d1767b 100644 --- a/bson/decimal128.py +++ b/bson/decimal128.py @@ -350,12 +350,12 @@ def __setstate__(self, value: tuple[int, int]) -> None: def __getstate__(self) -> tuple[int, int]: return self.__high, self.__low - def __eq__(self, other: Any) -> bool: + def __eq__(self, other: object) -> bool: if isinstance(other, Decimal128): return self.bid == other.bid return NotImplemented __hash__ = None # type: ignore[assignment] - def __ne__(self, other: Any) -> bool: + def __ne__(self, other: object) -> bool: return not self == other diff --git a/bson/json_util.py b/bson/json_util.py index c03355c6bc..558bf04654 100644 --- a/bson/json_util.py +++ b/bson/json_util.py @@ -140,12 +140,12 @@ from bson.tz_util import utc _RE_OPT_TABLE = { - "i": re.I, - "l": re.L, - "m": re.M, - "s": re.S, - "u": re.U, - "x": re.X, + "i": re.IGNORECASE, + "l": re.LOCALE, + "m": re.MULTILINE, + "s": re.DOTALL, + "u": re.UNICODE, + "x": re.VERBOSE, } diff --git a/bson/max_key.py b/bson/max_key.py index 0c4e7cffc2..69d4a7b12e 100644 --- a/bson/max_key.py +++ b/bson/max_key.py @@ -32,13 +32,13 @@ def __getstate__(self) -> Any: def __setstate__(self, state: Any) -> None: pass - def __eq__(self, other: Any) -> bool: + def __eq__(self, other: object) -> bool: return isinstance(other, MaxKey) def __hash__(self) -> int: return hash(self._type_marker) - def __ne__(self, other: Any) -> bool: + def __ne__(self, other: object) -> bool: return not self == other def __le__(self, other: Any) -> bool: diff --git a/bson/min_key.py b/bson/min_key.py index 5324e74fab..8a026129f7 100644 --- a/bson/min_key.py +++ b/bson/min_key.py @@ -32,13 +32,13 @@ def __getstate__(self) -> Any: def __setstate__(self, state: Any) -> None: pass - def __eq__(self, other: Any) -> bool: + def __eq__(self, other: object) -> bool: return isinstance(other, MinKey) def __hash__(self) -> int: return hash(self._type_marker) - def __ne__(self, other: Any) -> bool: + def __ne__(self, other: object) -> bool: return not self == other def __le__(self, dummy: Any) -> bool: diff --git a/bson/objectid.py b/bson/objectid.py index bf76117782..d4c9dce545 100644 --- a/bson/objectid.py +++ b/bson/objectid.py @@ -227,12 +227,12 @@ def __str__(self) -> str: def __repr__(self) -> str: return f"ObjectId('{self!s}')" - def __eq__(self, other: Any) -> bool: + def __eq__(self, other: object) -> bool: if isinstance(other, ObjectId): return self.__id == other.binary return NotImplemented - def __ne__(self, other: Any) -> bool: + def __ne__(self, other: object) -> bool: if isinstance(other, ObjectId): return self.__id != other.binary return NotImplemented diff --git a/bson/raw_bson.py b/bson/raw_bson.py index d6fc5a3de3..2bc91dfa13 100644 --- a/bson/raw_bson.py +++ b/bson/raw_bson.py @@ -182,7 +182,7 @@ def __iter__(self) -> Iterator[str]: def __len__(self) -> int: return len(self.__inflated) - def __eq__(self, other: Any) -> bool: + def __eq__(self, other: object) -> bool: if isinstance(other, RawBSONDocument): return self.__raw == other.raw return NotImplemented diff --git a/bson/regex.py b/bson/regex.py index 787302177b..c20a1c5f38 100644 --- a/bson/regex.py +++ b/bson/regex.py @@ -105,7 +105,7 @@ def __init__(self, pattern: _T, flags: str | int = 0) -> None: else: raise TypeError(f"flags must be a string or int, not {type(flags)}") - def __eq__(self, other: Any) -> bool: + def __eq__(self, other: object) -> bool: if isinstance(other, Regex): return self.pattern == other.pattern and self.flags == other.flags else: @@ -113,7 +113,7 @@ def __eq__(self, other: Any) -> bool: __hash__ = None # type: ignore - def __ne__(self, other: Any) -> bool: + def __ne__(self, other: object) -> bool: return not self == other def __repr__(self) -> str: diff --git a/bson/son.py b/bson/son.py index 7b3c373e4f..33d67b4dc6 100644 --- a/bson/son.py +++ b/bson/son.py @@ -177,17 +177,17 @@ def get( # type: ignore[override] except KeyError: return default - def __eq__(self, other: Any) -> bool: + def __eq__(self, other: object) -> bool: """Comparison to another SON is order-sensitive while comparison to a regular dictionary is order-insensitive. """ if isinstance(other, SON): return len(self) == len(other) and list(self.items()) == list(other.items()) - return cast(bool, self.to_dict() == other) + return self.to_dict() == other __hash__ = None - def __ne__(self, other: Any) -> bool: + def __ne__(self, other: object) -> bool: return not self == other def __len__(self) -> int: diff --git a/bson/timestamp.py b/bson/timestamp.py index 3c23732333..c346623604 100644 --- a/bson/timestamp.py +++ b/bson/timestamp.py @@ -80,7 +80,7 @@ def inc(self) -> int: """Get the inc portion of this :class:`Timestamp`.""" return self.__inc - def __eq__(self, other: Any) -> bool: + def __eq__(self, other: object) -> bool: if isinstance(other, Timestamp): return self.__time == other.time and self.__inc == other.inc else: @@ -89,7 +89,7 @@ def __eq__(self, other: Any) -> bool: def __hash__(self) -> int: return hash(self.time) ^ hash(self.inc) - def __ne__(self, other: Any) -> bool: + def __ne__(self, other: object) -> bool: return not self == other def __lt__(self, other: Any) -> bool: diff --git a/pymongo/asynchronous/auth_oidc.py b/pymongo/asynchronous/auth_oidc.py index 090241f6c8..8d40dcf3a4 100644 --- a/pymongo/asynchronous/auth_oidc.py +++ b/pymongo/asynchronous/auth_oidc.py @@ -130,7 +130,7 @@ async def _authenticate_human(self, conn: AsyncConnection) -> Mapping[str, Any] async def _get_access_token(self) -> str | None: properties = self.properties - cb: None | OIDCCallback + cb: OIDCCallback | None resp: OIDCCallbackResult is_human = properties.human_callback is not None diff --git a/pymongo/asynchronous/collection.py b/pymongo/asynchronous/collection.py index ae1685fab8..25f819d5a7 100644 --- a/pymongo/asynchronous/collection.py +++ b/pymongo/asynchronous/collection.py @@ -294,12 +294,12 @@ def __getitem__(self, name: str) -> AsyncCollection[_DocumentType]: def __repr__(self) -> str: return f"{type(self).__name__}({self._database!r}, {self._name!r})" - def __eq__(self, other: Any) -> bool: + def __eq__(self, other: object) -> bool: if isinstance(other, AsyncCollection): return self._database == other.database and self._name == other.name return NotImplemented - def __ne__(self, other: Any) -> bool: + def __ne__(self, other: object) -> bool: return not self == other def __hash__(self) -> int: diff --git a/pymongo/asynchronous/database.py b/pymongo/asynchronous/database.py index 94d3f2193c..fce17a52bb 100644 --- a/pymongo/asynchronous/database.py +++ b/pymongo/asynchronous/database.py @@ -207,12 +207,12 @@ def with_options( read_concern or self.read_concern, ) - def __eq__(self, other: Any) -> bool: + def __eq__(self, other: object) -> bool: if isinstance(other, AsyncDatabase): return self._client == other.client and self._name == other.name return NotImplemented - def __ne__(self, other: Any) -> bool: + def __ne__(self, other: object) -> bool: return not self == other def __hash__(self) -> int: diff --git a/pymongo/asynchronous/mongo_client.py b/pymongo/asynchronous/mongo_client.py index 930df33785..5eabd48e1c 100644 --- a/pymongo/asynchronous/mongo_client.py +++ b/pymongo/asynchronous/mongo_client.py @@ -1385,12 +1385,12 @@ def eq_props(self) -> tuple[tuple[_Address, ...], str | None, str | None, str]: self._resolve_srv_info["srv_service_name"], ) - def __eq__(self, other: Any) -> bool: + def __eq__(self, other: object) -> bool: if isinstance(other, self.__class__): return self.eq_props() == other.eq_props() return NotImplemented - def __ne__(self, other: Any) -> bool: + def __ne__(self, other: object) -> bool: return not self == other def __hash__(self) -> int: diff --git a/pymongo/collation.py b/pymongo/collation.py index dac664a474..0ed28d13fe 100644 --- a/pymongo/collation.py +++ b/pymongo/collation.py @@ -207,14 +207,14 @@ def __repr__(self) -> str: document = self.document return "Collation({})".format(", ".join(f"{key}={document[key]!r}" for key in document)) - def __eq__(self, other: Any) -> bool: + def __eq__(self, other: object) -> bool: if isinstance(other, Collation): return self.document == other.document return NotImplemented __hash__ = None # type: ignore[assignment] - def __ne__(self, other: Any) -> bool: + def __ne__(self, other: object) -> bool: return not self == other diff --git a/pymongo/common.py b/pymongo/common.py index e05c50c6af..d3c392e4c1 100644 --- a/pymongo/common.py +++ b/pymongo/common.py @@ -505,7 +505,7 @@ def validate_auth_mechanism_properties(option: str, value: Any) -> dict[str, boo def validate_document_class( option: str, value: Any -) -> type[MutableMapping[str, Any]] | type[RawBSONDocument]: +) -> type[MutableMapping[str, Any] | RawBSONDocument]: """Validate the document_class option.""" # Generic aliases like SON[str, Any] or dict[str, Any] aren't classes, so # resolve to their origin before the subclass check. issubclass() raises @@ -1041,7 +1041,7 @@ def __delitem__(self, key: str) -> None: del self.__casedkeys[lc_key] del self.__data[lc_key] - def __eq__(self, other: Any) -> bool: + def __eq__(self, other: object) -> bool: if not isinstance(other, abc.Mapping): return NotImplemented if len(self) != len(other): diff --git a/pymongo/message.py b/pymongo/message.py index f6b22b77cb..515fa03b55 100644 --- a/pymongo/message.py +++ b/pymongo/message.py @@ -754,8 +754,7 @@ def _client_construct_op_msg( buf.write(b"\x00\x00\x00\x00") buf.write(b"ops\x00") # Write all the ops documents - for op_encoded in to_send_ops_encoded: - buf.write(op_encoded) + buf.writelines(to_send_ops_encoded) resume_location = buf.tell() # Write type 1 section size length = buf.tell() @@ -770,8 +769,7 @@ def _client_construct_op_msg( buf.write(b"\x00\x00\x00\x00") buf.write(b"nsInfo\x00") # Write all the nsInfo documents - for ns_encoded in to_send_ns_encoded: - buf.write(ns_encoded) + buf.writelines(to_send_ns_encoded) # Write type 1 section size length = buf.tell() buf.seek(size_location) diff --git a/pymongo/operations.py b/pymongo/operations.py index fc28b4cc3a..272c37c42c 100644 --- a/pymongo/operations.py +++ b/pymongo/operations.py @@ -25,6 +25,7 @@ TYPE_CHECKING, Any, Generic, + cast, ) from bson.raw_bson import RawBSONDocument @@ -137,14 +138,15 @@ def __repr__(self) -> str: return f"{self.__class__.__name__}({self._doc!r}, {self._namespace!r})" return f"{self.__class__.__name__}({self._doc!r})" - def __eq__(self, other: Any) -> bool: + def __eq__(self, other: object) -> bool: if type(other) is type(self): - return other._doc == self._doc and other._namespace == self._namespace + _other = cast("InsertOne[_DocumentType]", other) + return _other._doc == self._doc and _other._namespace == self._namespace return NotImplemented __hash__ = None # type: ignore[assignment] - def __ne__(self, other: Any) -> bool: + def __ne__(self, other: object) -> bool: return not self == other @@ -176,13 +178,14 @@ def __init__( self._collation = collation self._namespace = namespace - def __eq__(self, other: Any) -> bool: + def __eq__(self, other: object) -> bool: if type(other) is type(self): + _other = cast("_DeleteOp", other) return ( - other._filter, - other._collation, - other._hint, - other._namespace, + _other._filter, + _other._collation, + _other._hint, + _other._namespace, ) == ( self._filter, self._collation, @@ -193,7 +196,7 @@ def __eq__(self, other: Any) -> bool: __hash__ = None # type: ignore[assignment] - def __ne__(self, other: Any) -> bool: + def __ne__(self, other: object) -> bool: return not self == other def __repr__(self) -> str: @@ -419,16 +422,17 @@ def _add_to_client_bulk(self, bulkobj: _AgnosticClientBulk) -> None: sort=self._sort, ) - def __eq__(self, other: Any) -> bool: + def __eq__(self, other: object) -> bool: if type(other) is type(self): + _other = cast("ReplaceOne[_DocumentType]", other) return ( - other._filter, - other._doc, - other._upsert, - other._collation, - other._hint, - other._namespace, - other._sort, + _other._filter, + _other._doc, + _other._upsert, + _other._collation, + _other._hint, + _other._namespace, + _other._sort, ) == ( self._filter, self._doc, @@ -442,7 +446,7 @@ def __eq__(self, other: Any) -> bool: __hash__ = None # type: ignore[assignment] - def __ne__(self, other: Any) -> bool: + def __ne__(self, other: object) -> bool: return not self == other def __repr__(self) -> str: @@ -519,7 +523,7 @@ def __eq__(self, other: object) -> bool: __hash__ = None # type: ignore[assignment] - def __ne__(self, other: Any) -> bool: + def __ne__(self, other: object) -> bool: return not self == other def __repr__(self) -> str: diff --git a/pymongo/pool_shared.py b/pymongo/pool_shared.py index 513136194f..040b62a4e8 100644 --- a/pymongo/pool_shared.py +++ b/pymongo/pool_shared.py @@ -252,10 +252,10 @@ def idle_time_seconds(self) -> float: """Seconds since this socket was last checked into its pool.""" return time.monotonic() - self.last_checkin_time - def __eq__(self, other: Any) -> bool: - return self.conn == other.conn + def __eq__(self, other: object) -> bool: + return self.conn == other.conn # type: ignore[attr-defined] - def __ne__(self, other: Any) -> bool: + def __ne__(self, other: object) -> bool: return not self == other def __hash__(self) -> int: diff --git a/pymongo/read_concern.py b/pymongo/read_concern.py index aa789709fc..21e66aa52c 100644 --- a/pymongo/read_concern.py +++ b/pymongo/read_concern.py @@ -66,7 +66,7 @@ def document(self) -> dict[str, Any]: doc["level"] = self.level return doc - def __eq__(self, other: Any) -> bool: + def __eq__(self, other: object) -> bool: if isinstance(other, ReadConcern): return self.document == other.document return NotImplemented diff --git a/pymongo/read_preferences.py b/pymongo/read_preferences.py index 2d287b0881..721725563e 100644 --- a/pymongo/read_preferences.py +++ b/pymongo/read_preferences.py @@ -236,7 +236,7 @@ def min_wire_version(self) -> int: def __repr__(self) -> str: return f"{self.name}(tag_sets={self.__tag_sets!r}, max_staleness={self.__max_staleness!r}, hedge={self.__hedge!r})" - def __eq__(self, other: Any) -> bool: + def __eq__(self, other: object) -> bool: if isinstance(other, _ServerMode): return ( self.mode == other.mode @@ -248,7 +248,7 @@ def __eq__(self, other: Any) -> bool: __hash__ = None # type: ignore[assignment] - def __ne__(self, other: Any) -> bool: + def __ne__(self, other: object) -> bool: return not self == other def __getstate__(self) -> dict[str, Any]: @@ -297,7 +297,7 @@ def __call__(self, selection: Selection) -> Selection: def __repr__(self) -> str: return "Primary()" - def __eq__(self, other: Any) -> bool: + def __eq__(self, other: object) -> bool: if isinstance(other, _ServerMode): return other.mode == _PRIMARY return NotImplemented diff --git a/pymongo/server_description.py b/pymongo/server_description.py index 8da8412ded..836436e450 100644 --- a/pymongo/server_description.py +++ b/pymongo/server_description.py @@ -265,7 +265,7 @@ def to_unknown(self, error: Exception | None = None) -> ServerDescription: unknown._topology_version = self.topology_version return unknown - def __eq__(self, other: Any) -> bool: + def __eq__(self, other: object) -> bool: if isinstance(other, ServerDescription): return ( (self._address == other.address) @@ -287,7 +287,7 @@ def __eq__(self, other: Any) -> bool: __hash__ = None # type: ignore[assignment] - def __ne__(self, other: Any) -> bool: + def __ne__(self, other: object) -> bool: return not self == other def __repr__(self) -> str: diff --git a/pymongo/synchronous/auth_oidc.py b/pymongo/synchronous/auth_oidc.py index f09e156b5b..f81059e16c 100644 --- a/pymongo/synchronous/auth_oidc.py +++ b/pymongo/synchronous/auth_oidc.py @@ -130,7 +130,7 @@ def _authenticate_human(self, conn: Connection) -> Mapping[str, Any] | None: def _get_access_token(self) -> str | None: properties = self.properties - cb: None | OIDCCallback + cb: OIDCCallback | None resp: OIDCCallbackResult is_human = properties.human_callback is not None diff --git a/pymongo/synchronous/collection.py b/pymongo/synchronous/collection.py index a4ab667189..6fbed057bf 100644 --- a/pymongo/synchronous/collection.py +++ b/pymongo/synchronous/collection.py @@ -295,12 +295,12 @@ def __getitem__(self, name: str) -> Collection[_DocumentType]: def __repr__(self) -> str: return f"{type(self).__name__}({self._database!r}, {self._name!r})" - def __eq__(self, other: Any) -> bool: + def __eq__(self, other: object) -> bool: if isinstance(other, Collection): return self._database == other.database and self._name == other.name return NotImplemented - def __ne__(self, other: Any) -> bool: + def __ne__(self, other: object) -> bool: return not self == other def __hash__(self) -> int: diff --git a/pymongo/synchronous/database.py b/pymongo/synchronous/database.py index cd6be5c6a6..cbf9d4129e 100644 --- a/pymongo/synchronous/database.py +++ b/pymongo/synchronous/database.py @@ -207,12 +207,12 @@ def with_options( read_concern or self.read_concern, ) - def __eq__(self, other: Any) -> bool: + def __eq__(self, other: object) -> bool: if isinstance(other, Database): return self._client == other.client and self._name == other.name return NotImplemented - def __ne__(self, other: Any) -> bool: + def __ne__(self, other: object) -> bool: return not self == other def __hash__(self) -> int: diff --git a/pymongo/synchronous/mongo_client.py b/pymongo/synchronous/mongo_client.py index 5da3846460..249bd54bbe 100644 --- a/pymongo/synchronous/mongo_client.py +++ b/pymongo/synchronous/mongo_client.py @@ -1385,12 +1385,12 @@ def eq_props(self) -> tuple[tuple[_Address, ...], str | None, str | None, str]: self._resolve_srv_info["srv_service_name"], ) - def __eq__(self, other: Any) -> bool: + def __eq__(self, other: object) -> bool: if isinstance(other, self.__class__): return self.eq_props() == other.eq_props() return NotImplemented - def __ne__(self, other: Any) -> bool: + def __ne__(self, other: object) -> bool: return not self == other def __hash__(self) -> int: diff --git a/pymongo/write_concern.py b/pymongo/write_concern.py index ebefe4ee4a..8b0450d722 100644 --- a/pymongo/write_concern.py +++ b/pymongo/write_concern.py @@ -131,14 +131,14 @@ def __repr__(self) -> str: ", ".join(f"{k}={v!r}" for k, v in self.__document.items()) ) - def __eq__(self, other: Any) -> bool: + def __eq__(self, other: object) -> bool: if isinstance(other, WriteConcern): return self.__document == other.document return NotImplemented __hash__ = None # type: ignore[assignment] - def __ne__(self, other: Any) -> bool: + def __ne__(self, other: object) -> bool: if isinstance(other, WriteConcern): return self.__document != other.document return NotImplemented diff --git a/pyproject.toml b/pyproject.toml index e8c68fa546..f957e252cb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -57,7 +57,7 @@ exclude-newer = "7 days" [dependency-groups] dev = [] lint = [ - "ruff==0.15.20", + "ruff==0.17.3", ] unasync = [ {include-group = "lint"}, @@ -195,7 +195,7 @@ line-length = 100 extend-exclude = ["drivers-evergreen-tools"] [tool.ruff.lint] -select = [ +extend-select = [ "E", "F", "W", # flake8 "B", # flake8-bugbear "I", # isort @@ -245,6 +245,21 @@ ignore = [ "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 + "ICN001", # Use standard import naming conventions (pandas as pd, datetime as dt...) + # These are all new defaults added in ruff 0.16.0. Individual tickets linked from PYTHON-5964 track enabling each one. + "BLE", # flake8-blind-except + "FURB", # refurb + "LOG", # flake8-logging + "PERF", # Perflint + "PYI", # flake8-pyi + "TC", # flake8-type-checking + "TRY", # tryceratops + "INT", # flake8-gettext + "FA", # flake8-future-annotations + "ISC", # flake8-implicit-str-concat + "FLY", # flynt + "D", # pydocstyle + "N", # pep8-naming ] unfixable = [ "RUF100", # Unused noqa @@ -262,7 +277,7 @@ dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?)|dummy.*)$" ".evergreen/scripts/setup-uv.py" = ["I002"] "test/*.py" = ["PT", "E402", "PLW", "SIM", "E741", "PTH", "S", "B904", "E722", "T201", "RET", "ARG", "F405", "B028", "PGH001", "B018", "F403", "RUF015", "E731", "B007", - "UP031", "F401", "B023", "F811"] + "UP031", "F401", "B023", "F811", "DTZ002"] "tools/*.py" = ["T201"] "tools/test_*.py" = ["E402", "S"] "fuzz/*.py" = ["T201", "E402"] diff --git a/test/asynchronous/test_client.py b/test/asynchronous/test_client.py index 2b61dda182..b85adfcdaa 100644 --- a/test/asynchronous/test_client.py +++ b/test/asynchronous/test_client.py @@ -860,7 +860,7 @@ def test_detected_environment_logging(self, mock_get_hosts): @skipIf(os.environ.get("DEBUG_LOG"), "Enabling debug logs breaks this test") @patch("pymongo.asynchronous.srv_resolver._SrvResolver.get_hosts") async def test_detected_environment_warning(self, mock_get_hosts): - with self._caplog.at_level(logging.WARN): + with self._caplog.at_level(logging.WARNING): normal_hosts = [ "host.cosmos.azure.com", "host.docdb.amazonaws.com", diff --git a/test/asynchronous/test_database.py b/test/asynchronous/test_database.py index c63c80a5c8..ae3b19073e 100644 --- a/test/asynchronous/test_database.py +++ b/test/asynchronous/test_database.py @@ -212,7 +212,7 @@ async def test_list_collection_names_filter(self): await db.capped.insert_one({}) await db.non_capped.insert_one({}) self.addAsyncCleanup(client.drop_database, db.name) - filter: None | Mapping[str, Any] + filter: Mapping[str, Any] | None # Should not send nameOnly. for filter in ({"options.capped": True}, {"options.capped": True, "name": "capped"}): listener.reset() diff --git a/test/test_bson.py b/test/test_bson.py index d3940bda7f..6f47927d06 100644 --- a/test/test_bson.py +++ b/test/test_bson.py @@ -1283,8 +1283,8 @@ def test_bson_regex(self): self.assertEqual(doc1, decode(doc1_bson)) # Valid Python regex, with flags. - re2 = re.compile(".*", re.I | re.M | re.S | re.U | re.X) - bson_re2 = Regex(".*", re.I | re.M | re.S | re.U | re.X) + re2 = re.compile(".*", re.IGNORECASE | re.MULTILINE | re.DOTALL | re.UNICODE | re.VERBOSE) + bson_re2 = Regex(".*", re.IGNORECASE | re.MULTILINE | re.DOTALL | re.UNICODE | re.VERBOSE) doc2_with_re = {"r": re2} doc2_with_bson_re = {"r": bson_re2} @@ -1300,11 +1300,14 @@ def test_regex_from_native(self): self.assertEqual(".*", Regex.from_native(re.compile(".*")).pattern) self.assertEqual(0, Regex.from_native(re.compile(b"")).flags) - regex = re.compile(b"", re.I | re.L | re.M | re.S | re.X) - self.assertEqual(re.I | re.L | re.M | re.S | re.X, Regex.from_native(regex).flags) + regex = re.compile(b"", re.IGNORECASE | re.LOCALE | re.MULTILINE | re.DOTALL | re.VERBOSE) + self.assertEqual( + re.IGNORECASE | re.LOCALE | re.MULTILINE | re.DOTALL | re.VERBOSE, + Regex.from_native(regex).flags, + ) - unicode_regex = re.compile("", re.U) - self.assertEqual(re.U, Regex.from_native(unicode_regex).flags) + unicode_regex = re.compile("", re.UNICODE) + self.assertEqual(re.UNICODE, Regex.from_native(unicode_regex).flags) def test_regex_hash(self): self.assertRaises(TypeError, hash, Regex("hello")) @@ -1313,11 +1316,11 @@ def test_regex_comparison(self): re1 = Regex("a") re2 = Regex("b") self.assertNotEqual(re1, re2) - re1 = Regex("a", re.I) - re2 = Regex("a", re.M) + re1 = Regex("a", re.IGNORECASE) + re2 = Regex("a", re.MULTILINE) self.assertNotEqual(re1, re2) - re1 = Regex("a", re.I) - re2 = Regex("a", re.I) + re1 = Regex("a", re.IGNORECASE) + re2 = Regex("a", re.IGNORECASE) self.assertEqual(re1, re2) def test_exception_wrapping(self): diff --git a/test/test_client.py b/test/test_client.py index dff1bea01f..c18f0b1d1d 100644 --- a/test/test_client.py +++ b/test/test_client.py @@ -853,7 +853,7 @@ def test_detected_environment_logging(self, mock_get_hosts): @skipIf(os.environ.get("DEBUG_LOG"), "Enabling debug logs breaks this test") @patch("pymongo.synchronous.srv_resolver._SrvResolver.get_hosts") def test_detected_environment_warning(self, mock_get_hosts): - with self._caplog.at_level(logging.WARN): + with self._caplog.at_level(logging.WARNING): normal_hosts = [ "host.cosmos.azure.com", "host.docdb.amazonaws.com", diff --git a/test/test_database.py b/test/test_database.py index 501b2ceb28..849cf41cb6 100644 --- a/test/test_database.py +++ b/test/test_database.py @@ -211,7 +211,7 @@ def test_list_collection_names_filter(self): db.capped.insert_one({}) db.non_capped.insert_one({}) self.addCleanup(client.drop_database, db.name) - filter: None | Mapping[str, Any] + filter: Mapping[str, Any] | None # Should not send nameOnly. for filter in ({"options.capped": True}, {"options.capped": True, "name": "capped"}): listener.reset() diff --git a/test/test_json_util.py b/test/test_json_util.py index ada04955c4..fadcb431f6 100644 --- a/test/test_json_util.py +++ b/test/test_json_util.py @@ -343,7 +343,7 @@ def test_regex_object_hook(self): loaded = json_util.object_hook(json.loads(json_re)) self.assertIsInstance(loaded, Regex) self.assertEqual(pat, loaded.pattern) - self.assertEqual(re.U, loaded.flags) + self.assertEqual(re.UNICODE, loaded.flags) def test_regex(self): for regex_instance in (re.compile("a*b", re.IGNORECASE), Regex("a*b", re.IGNORECASE)): @@ -354,7 +354,7 @@ def test_regex(self): self.assertEqual("a*b", res.pattern) self.assertEqual(re.IGNORECASE, res.flags) - unicode_options = re.I | re.M | re.S | re.U | re.X + unicode_options = re.IGNORECASE | re.MULTILINE | re.DOTALL | re.UNICODE | re.VERBOSE regex = re.compile("a*b", unicode_options) res = self.round_tripped({"r": regex})["r"] self.assertEqual(unicode_options, res.flags) @@ -370,17 +370,19 @@ def test_regex(self): # Check order. self.assertEqual( '{"$regularExpression": {"pattern": ".*", "options": "mx"}}', - json_util.dumps(Regex(".*", re.M | re.X)), + json_util.dumps(Regex(".*", re.MULTILINE | re.VERBOSE)), ) self.assertEqual( '{"$regularExpression": {"pattern": ".*", "options": "mx"}}', - json_util.dumps(re.compile(b".*", re.M | re.X)), + json_util.dumps(re.compile(b".*", re.MULTILINE | re.VERBOSE)), ) self.assertEqual( '{"$regex": ".*", "$options": "mx"}', - json_util.dumps(Regex(".*", re.M | re.X), json_options=LEGACY_JSON_OPTIONS), + json_util.dumps( + Regex(".*", re.MULTILINE | re.VERBOSE), json_options=LEGACY_JSON_OPTIONS + ), ) def test_regex_validation(self): diff --git a/test/test_typing.py b/test/test_typing.py index ce629eea89..dc6d2c8b14 100644 --- a/test/test_typing.py +++ b/test/test_typing.py @@ -156,12 +156,12 @@ def test_distinct(self) -> None: def collection_distinct( collection: Collection, - ) -> list[None | int | str | ObjectId | bool]: + ) -> list[int | str | ObjectId | bool | None]: return collection.distinct("_id") def cursor_distinct( collection: Collection, - ) -> list[None | int | str | ObjectId | bool]: + ) -> list[int | str | ObjectId | bool | None]: cursor = collection.find() return cursor.distinct("_id") diff --git a/tools/ensure_future_annotations_import.py b/tools/ensure_future_annotations_import.py index e98e7ed04e..d3dfb781d6 100644 --- a/tools/ensure_future_annotations_import.py +++ b/tools/ensure_future_annotations_import.py @@ -27,7 +27,7 @@ continue found = False with open(path) as fid: - for line in fid.readlines(): + for line in fid: if line.strip() == pattern: found = True break diff --git a/uv.lock b/uv.lock index 0b1489c36f..7eac1bfbea 100644 --- a/uv.lock +++ b/uv.lock @@ -1515,7 +1515,7 @@ coverage = [{ name = "coverage", extras = ["toml"], specifier = ">=6.4,<=7.15.0" dev = [] fuzz = [{ name = "atheris", specifier = ">=2.3.0" }] gevent = [{ name = "gevent", specifier = ">=25.9.1" }] -lint = [{ name = "ruff", specifier = "==0.15.20" }] +lint = [{ name = "ruff", specifier = "==0.17.3" }] mockupdb = [{ name = "mockupdb", specifier = ">=1.8.1" }] perf = [{ name = "simplejson", specifier = ">=3.17.0" }] pip = [{ name = "pip", specifier = ">=20.2" }] @@ -1526,7 +1526,7 @@ typing = [ { name = "typing-extensions", specifier = ">=3.7.4.2" }, ] unasync = [ - { name = "ruff", specifier = "==0.15.20" }, + { name = "ruff", specifier = "==0.17.3" }, { name = "unasync" }, ] @@ -1687,27 +1687,27 @@ wheels = [ [[package]] name = "ruff" -version = "0.15.20" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/43/dc/35b341fc554ba02f217fc10da57d1a75168cfbcf75b0ef2202176d4c4f2d/ruff-0.15.20.tar.gz", hash = "sha256:1416eb04349192646b54de98f146c4f59afe37d0decfc02c3cbbf396f3a28566", size = 4755489, upload-time = "2026-06-25T17:20:37.578Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/94/d9/2d5014f0253ba541d2061d9fa7193f48e941c8b21bb88a7ff9bbe0bd0596/ruff-0.15.20-py3-none-linux_armv6l.whl", hash = "sha256:00e188c53e499c3c1637f73c91dcf2fb56d576cab76ce1be50a27c4e80e37078", size = 10839665, upload-time = "2026-06-25T17:19:44.702Z" }, - { url = "https://files.pythonhosted.org/packages/c6/d3/ac1798ba64f670698867fcfc591d50e7e421bef137db564858f619a30fcf/ruff-0.15.20-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:9ebd1fd9b9c95fc0bd7b2761aebec1f030013d2e193a2901b224af68fe47251b", size = 11208649, upload-time = "2026-06-25T17:19:48.787Z" }, - { url = "https://files.pythonhosted.org/packages/47/47/d3ac899991202095dfcf3d5176be4272642be3cf981a2f1a30f72a2afb95/ruff-0.15.20-py3-none-macosx_11_0_arm64.whl", hash = "sha256:c5b16cdd67ca108185cd36dce98c576350c03b1660a751de725fb049193a0632", size = 10622638, upload-time = "2026-06-25T17:19:51.354Z" }, - { url = "https://files.pythonhosted.org/packages/33/13/4e043fe30aa94d4ff5213a9881fc296d12960f5971b234a5263fdc225312/ruff-0.15.20-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3413bb3c3d2ca6a8208f1f4809cd2dca3c6de6d0b491c0e70847672bde6e6efd", size = 10984227, upload-time = "2026-06-25T17:19:54.044Z" }, - { url = "https://files.pythonhosted.org/packages/76/e6/92e7bf40388bc5800073b96564f56264f7e48bfd1a498f5ced6ae6d5a769/ruff-0.15.20-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:bd7ec42b3bb3da066488db093308a69c4ac5ee6d2af333a86ba6e2eb2e7dd44b", size = 10622882, upload-time = "2026-06-25T17:19:57.037Z" }, - { url = "https://files.pythonhosted.org/packages/13/7a/43460be3f24495a3aa46d4b16873e2c4941b3b5f0b00cf88c03b7b94b339/ruff-0.15.20-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e1a36ad0eb77fba9aabfb69ede54de6f376d04ac18ebea022847046d340a8267", size = 11474808, upload-time = "2026-06-25T17:20:00.357Z" }, - { url = "https://files.pythonhosted.org/packages/27/a0/f37077884873221c6b33b4ab49eb18f9f88e54a16a25a5bca59bef46dd66/ruff-0.15.20-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b6df3b1e4610432f0386dba04d853b5f08cbbc903410c6fcc02f620f05aff53c", size = 12293094, upload-time = "2026-06-25T17:20:03.446Z" }, - { url = "https://files.pythonhosted.org/packages/a6/74/165545b60256a9704c21ac0ec4a0d07933b320812f9584836c9f4aca4292/ruff-0.15.20-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:e89f198a1ea6ef0d727c1cf16088bc91a6cb0ab947dedc966715691647186eae", size = 11526176, upload-time = "2026-06-25T17:20:06.301Z" }, - { url = "https://files.pythonhosted.org/packages/86/b1/a976a136d40ade83ce743578399865f57001003a409acadc0ecbb3051082/ruff-0.15.20-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:309809086c2acb67624950a3c8133e80f32d0d3e27106c0cd60ff26657c9f24b", size = 11520767, upload-time = "2026-06-25T17:20:09.191Z" }, - { url = "https://files.pythonhosted.org/packages/19/0f/f032696cb01c9b54c0263fa393474d7758f1cdc021a01b04e3cbc2500999/ruff-0.15.20-py3-none-manylinux_2_31_riscv64.whl", hash = "sha256:2d2374caa2f2c2f9e2b7da0a50802cfb8b79f55a9b5e49379f564544fbf56487", size = 11500132, upload-time = "2026-06-25T17:20:13.602Z" }, - { url = "https://files.pythonhosted.org/packages/4b/f4/51b1a14bc69e8c224b15dab9cce8e99b425e0455d462caa2b3c9be2b6a8e/ruff-0.15.20-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:a1ed17b65293e0c2f22fc387bc13198a5de94bf4429589b0ff6946b0feaf21a3", size = 10943828, upload-time = "2026-06-25T17:20:16.635Z" }, - { url = "https://files.pythonhosted.org/packages/71/4b/fe267640783cd02bf6c5cc290b1df1051be2ec294c678b5c15fe19e52343/ruff-0.15.20-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:f701305e66b38ea6c91882490eb73459796808e4c6362a1b765255e0cdcd4053", size = 10645418, upload-time = "2026-06-25T17:20:19.4Z" }, - { url = "https://files.pythonhosted.org/packages/b0/c0/a65aa4ec2f5e87a1df32dc3ec1fede434fe3dfd5cbcf3b503cafc676ab54/ruff-0.15.20-py3-none-musllinux_1_2_i686.whl", hash = "sha256:5b9c0c367ad8e5d0d5b5b8537864c469a0a0e55417aadfbeca41fa61333be9f4", size = 11211770, upload-time = "2026-06-25T17:20:22.033Z" }, - { url = "https://files.pythonhosted.org/packages/5a/a4/0caa331d954ae2723d729d351c989cb4ca8b6077d5c6c2cb6de75e98c041/ruff-0.15.20-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:01cc00dd58f0df339d0e902219dd53990ea99996a0344e5d9cc8d45d5307e460", size = 11618698, upload-time = "2026-06-25T17:20:25.259Z" }, - { url = "https://files.pythonhosted.org/packages/10/9b/5f14927848d2fd4aa891fd88d883788c5a7baba561c7874732364045708c/ruff-0.15.20-py3-none-win32.whl", hash = "sha256:ed65ef510e43a137207e0f01cfcf998aeddb1aeeda5c9d35023e910284d7cf21", size = 10857322, upload-time = "2026-06-25T17:20:28.612Z" }, - { url = "https://files.pythonhosted.org/packages/fa/f0/fe47c501f9dea92a26d788ff98bb5d92ed4cb4c88792c5c88af6b697dc8e/ruff-0.15.20-py3-none-win_amd64.whl", hash = "sha256:a525c81c70fb0380344dd1d8745d8cc1c890b7fc94a58d5a07bd8eb9557b8415", size = 11993274, upload-time = "2026-06-25T17:20:31.871Z" }, - { url = "https://files.pythonhosted.org/packages/d7/2b/9555445e1201d92b3195f45cdb153a0b68f24e0a4273f6e3d5ab46e212bb/ruff-0.15.20-py3-none-win_arm64.whl", hash = "sha256:2f5b2a6d614e8700388806a14996c40fab2c47b819ef57d790a34878858ed9ca", size = 11343498, upload-time = "2026-06-25T17:20:35.03Z" }, +version = "0.17.3" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/59/73/81f140c4edd9cc323de5478e6bbd3bbcfae9a82692df1a258de8cec6a6d2/ruff-0.17.3.tar.gz", hash = "sha256:a57049c8addb3662073859bb55a7ad35aa54f8a7c9ed268911d1333c5aadaaa9", size = 5339444, upload-time = "2026-10-27T00:34:05.914Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/9e/8c/083365310c4e79c842f25bf5a842facbd9b0c0ec336f96dffa5074fe723d/ruff-0.17.3-py3-none-linux_armv6l.whl", hash = "sha256:ab86b84cd9d05e56d329742c0cabdcbe2d1d56c98f4a04aab9b5b66196febfb4", size = 10216522, upload-time = "2026-10-27T00:33:29.822Z" }, + { url = "https://files.pythonhosted.org/packages/72/26/4b2edf31cfebe9605d8f6ed8f1d6f376d3a53d4c9a123e62661c64c440f0/ruff-0.17.3-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:e407b4a6852853a9a2cdce96963e94ad9775578bb44e7561a0f2829f3cc04b11", size = 10217786, upload-time = "2026-10-27T00:33:33.949Z" }, + { url = "https://files.pythonhosted.org/packages/a2/7e/537aba4b7f54397a374d2f6a6fc93e9c8015e18553f31a4a7b7dbced48b5/ruff-0.17.3-py3-none-macosx_11_0_arm64.whl", hash = "sha256:b75cc113b3aca388933d8296b667b1ac401a80317ea3074c9b0a66541199da29", size = 9440362, upload-time = "2026-10-27T00:33:35.784Z" }, + { url = "https://files.pythonhosted.org/packages/3d/66/283e39734f66c8a5ebaa93c22eb7b7515779a0b1d5a5c0ad20e05c0edb41/ruff-0.17.3-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ab5fa7ed5ce18554ea69d850ad162cbaa0c85fc47c08d83a569f806681c9a6ad", size = 10094281, upload-time = "2026-10-27T00:33:38.216Z" }, + { url = "https://files.pythonhosted.org/packages/21/4c/1ffc768497bd025a32c72152771e40c0b99bddc5cc6e4f50c7949a395346/ruff-0.17.3-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:c673c170e27834d1262e3a9c1e97bdc9b9c3b180c63d89173ce69747232474c1", size = 10022543, upload-time = "2026-10-27T00:33:40.181Z" }, + { url = "https://files.pythonhosted.org/packages/73/c3/f90db547301080fcb82c92abf914c8bd57b89911d9b65a6c4cc6b52d0635/ruff-0.17.3-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6a754c0341bc9ca151b7b335988b3263921c08859f84ca219b70cee825571b6f", size = 10683921, upload-time = "2026-10-27T00:33:42.182Z" }, + { url = "https://files.pythonhosted.org/packages/e5/98/92d4a8a26c6c96cf1a5b34dd59036d8a71e52d650aab065c58867e964e63/ruff-0.17.3-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:4590b9d86c0b1543ebb09094254e191cd43fe8edaf330baa035aab03da251532", size = 11373408, upload-time = "2026-10-27T00:33:44.19Z" }, + { url = "https://files.pythonhosted.org/packages/43/02/1f24d2e3064c9753926deeb901afa57777b37ee46799b09ddd7aee6e5145/ruff-0.17.3-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:bbde18beccd98c29a227c63c99022e3443b99258e08326df6425dfe0443705ef", size = 10977469, upload-time = "2026-10-27T00:33:46.179Z" }, + { url = "https://files.pythonhosted.org/packages/f0/20/fecedea2209f574ab92033b344e01a7f0c2dc76c6d6d19a14c9f8141173f/ruff-0.17.3-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7fa4b0f931cdbcb8a52044f370a3eb429fb42eb88807b0e800fcaa98dd42b24e", size = 10577491, upload-time = "2026-10-27T00:33:48.233Z" }, + { url = "https://files.pythonhosted.org/packages/33/36/b93fdf0bc6f84f0cd487aadfb0354deb40013669ea35ac3d26855de1e959/ruff-0.17.3-py3-none-manylinux_2_31_riscv64.whl", hash = "sha256:39405f341deec934b4289634324ad695f72df2970f9121582872eaf5b722f0f5", size = 10608748, upload-time = "2026-10-27T00:33:50.284Z" }, + { url = "https://files.pythonhosted.org/packages/5d/b7/7d3f5f14145daead1efb0b9a8289ed1daa100f419d60774375951723ce00/ruff-0.17.3-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:68074094f55ca3d29ab19491f640282f7a84061c4c7977aa5094b968ca457e9a", size = 10075057, upload-time = "2026-10-27T00:33:52.074Z" }, + { url = "https://files.pythonhosted.org/packages/b0/ed/93ff7a5909ee56e2bd4b982deae9e0efb2724417874a90c9e41ad66c6dd7/ruff-0.17.3-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:27bb571ac78fef178fe5118d2827df95c2aae74a48fff2b15f6acd03af5ff5bb", size = 10022431, upload-time = "2026-10-27T00:33:54.061Z" }, + { url = "https://files.pythonhosted.org/packages/9b/07/a83b9eeec8c1c3c0e4eda15f06c3a91001bfd2687ea2f07b750719bf9712/ruff-0.17.3-py3-none-musllinux_1_2_i686.whl", hash = "sha256:029c37cbd3de48ca37aa12117bead2d065f15da17d66bf84e0d4274013705db2", size = 10394903, upload-time = "2026-10-27T00:33:56.158Z" }, + { url = "https://files.pythonhosted.org/packages/af/b2/05c39857c2526fcbebe46ad93a8dc97424656dfef14d3ef933abe1ffd331/ruff-0.17.3-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:692fdb46d0fd9c71e380947dc5fc72f2c3f881073bc1f739e4579376231affbe", size = 10799780, upload-time = "2026-10-27T00:33:58.204Z" }, + { url = "https://files.pythonhosted.org/packages/ec/d9/47171a16739eb7a353936b31c20cf54340531e68c9af7d72fd7a784e235d/ruff-0.17.3-py3-none-win32.whl", hash = "sha256:46539cb031b01fd29ae0a02142483c46640b233ee12bb1c1b690bffa1555d5ca", size = 9908481, upload-time = "2026-10-27T00:34:00.087Z" }, + { url = "https://files.pythonhosted.org/packages/d0/a0/f08c1631bfd81faa6a90eaf70c37c786c11bed2046302b56bb506c25e1a0/ruff-0.17.3-py3-none-win_amd64.whl", hash = "sha256:56b8ffb3f3b3cbccb8b76b71b38261b7ed982ef5d20f5b447b1b61a7f4949b24", size = 10341333, upload-time = "2026-10-27T00:34:02.099Z" }, + { url = "https://files.pythonhosted.org/packages/99/d5/4ad4ed31413c301430918e70d3d38ae6f097af0766cb9ab8c9d502b2a4d6/ruff-0.17.3-py3-none-win_arm64.whl", hash = "sha256:81fce74bcd6be0e9da7c67c7553fd0f1f12964a2052cd728ef917b937a5ca1d9", size = 9854332, upload-time = "2026-10-27T00:34:03.847Z" }, ] [[package]]