Remove `if` condition in `_collections_abc._type_repr` that's no longer needed, bringing it in sync with `typing._type_repr`.
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__
typically enough to uniquely identify a type. For everything
else, we fall back on repr(obj).
"""
+ # When changing this function, don't forget about
+ # `_collections_abc._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__