diff options
author | Nikita Sobolev <mail@sobolevn.me> | 2023-03-16 13:05:38 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-16 13:05:38 (GMT) |
commit | a297d59609038ccfc3bdf6f350e8401f07b0a931 (patch) | |
tree | d5db42d8f702806d7e34981195d0613f68471923 /Lib/_collections_abc.py | |
parent | 51d693c58454a2c525094a7c74ebac86859353fd (diff) | |
download | cpython-a297d59609038ccfc3bdf6f350e8401f07b0a931.zip cpython-a297d59609038ccfc3bdf6f350e8401f07b0a931.tar.gz cpython-a297d59609038ccfc3bdf6f350e8401f07b0a931.tar.bz2 |
Add comments to `{typing,_collections_abc}._type_repr` about each other (#102752)
Remove `if` condition in `_collections_abc._type_repr` that's no longer needed, bringing it in sync with `typing._type_repr`.
Diffstat (limited to 'Lib/_collections_abc.py')
-rw-r--r-- | Lib/_collections_abc.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/Lib/_collections_abc.py b/Lib/_collections_abc.py index c62233b..f86b91a 100644 --- a/Lib/_collections_abc.py +++ b/Lib/_collections_abc.py @@ -517,9 +517,8 @@ def _type_repr(obj): Copied from :mod:`typing` since collections.abc shouldn't depend on that module. + (Keep this roughly in sync with the typing version.) """ - if isinstance(obj, GenericAlias): - return repr(obj) if isinstance(obj, type): if obj.__module__ == 'builtins': return obj.__qualname__ |