Skip to content

Commit 75f484d

Browse files
committed
Fix the typing of pip._internal.utils.*
1 parent 758a172 commit 75f484d

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/pip/_internal/utils/misc.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -542,10 +542,9 @@ def __str__(self) -> str:
542542
return self.redacted
543543

544544
# This is useful for testing.
545-
def __eq__(self, other: Any) -> bool:
546-
if type(self) is not type(other):
545+
def __eq__(self, other: object) -> bool:
546+
if type(self) is not type(other) or not isinstance(other, HiddenText):
547547
return False
548-
549548
# The string being used for redaction doesn't also have to match,
550549
# just the raw, original string.
551550
return self.secret == other.secret

0 commit comments

Comments
 (0)