diff --git a/src/packaging/markers.py b/src/packaging/markers.py index fb7f49cf..c8129770 100644 --- a/src/packaging/markers.py +++ b/src/packaging/markers.py @@ -292,7 +292,7 @@ def __repr__(self) -> str: def __hash__(self) -> int: return hash((self.__class__.__name__, str(self))) - def __eq__(self, other: Any) -> bool: + def __eq__(self, other: object) -> bool: if not isinstance(other, Marker): return NotImplemented diff --git a/src/packaging/requirements.py b/src/packaging/requirements.py index 4e068c95..eceff3f1 100644 --- a/src/packaging/requirements.py +++ b/src/packaging/requirements.py @@ -3,7 +3,7 @@ # for complete details. from __future__ import annotations -from typing import Any, Iterator +from typing import Iterator from ._parser import parse_requirement as _parse_requirement from ._tokenizer import ParserSyntaxError @@ -78,7 +78,7 @@ def __hash__(self) -> int: ) ) - def __eq__(self, other: Any) -> bool: + def __eq__(self, other: object) -> bool: if not isinstance(other, Requirement): return NotImplemented