Skip to content

Commit

Permalink
remove type annotations from multiprocessing.
Browse files Browse the repository at this point in the history
One of them was technically invalid per typing specs... but since we're not
checking these in the stdlib today lets elide them.

https://discuss.python.org/t/static-type-annotations-in-cpython/65068/13
  • Loading branch information
gpshead committed Jan 27, 2025
1 parent 379ab85 commit 5327323
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Lib/multiprocessing/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -853,7 +853,7 @@ def PipeClient(address):
_LEGACY_LENGTHS = (_MD5ONLY_MESSAGE_LENGTH, _MD5_DIGEST_LEN)


def _get_digest_name_and_payload(message: bytes) -> (str, bytes):
def _get_digest_name_and_payload(message): # (message: bytes) -> tuple[str, bytes]
"""Returns a digest name and the payload for a response hash.
If a legacy protocol is detected based on the message length
Expand Down
2 changes: 1 addition & 1 deletion Lib/multiprocessing/synchronize.py
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ def wait(self, timeout=None):
return True
return False

def __repr__(self) -> str:
def __repr__(self):
set_status = 'set' if self.is_set() else 'unset'
return f"<{type(self).__qualname__} at {id(self):#x} {set_status}>"
#
Expand Down

0 comments on commit 5327323

Please sign in to comment.