Visitar URL original
Add comments to `{typing,_collections_abc}._type_repr` about each other by sobolevn · Pull Request #102752 · python/cpython · GitHub
Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Address review
  • Loading branch information
sobolevn committed Mar 16, 2023
commit 1383fe88e02df88942f90ee34dd612889701c7c0
4 changes: 1 addition & 3 deletions Lib/_collections_abc.py
Original file line number Diff line number Diff line change
Expand Up @@ -517,10 +517,8 @@ def _type_repr(obj):

Copied from :mod:`typing` since collections.abc
shouldn't depend on that module.
Comment thread
sobolevn marked this conversation as resolved.
(Keep this roughly in sync with the typing version.)
"""
# When changing this function, don't forget about
# `typing._type_repr`, which does the same thing
# and must be consistent with this one.
if isinstance(obj, type):
if obj.__module__ == 'builtins':
return obj.__qualname__
Expand Down