mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
gh-95987: Fix repr
of Any
type subclasses (#96412)
This commit is contained in:
parent
6d791a9736
commit
4217393aee
3 changed files with 10 additions and 1 deletions
|
@ -493,7 +493,9 @@ class _AnyMeta(type):
|
|||
return super().__instancecheck__(obj)
|
||||
|
||||
def __repr__(self):
|
||||
return "typing.Any"
|
||||
if self is Any:
|
||||
return "typing.Any"
|
||||
return super().__repr__() # respect to subclasses
|
||||
|
||||
|
||||
class Any(metaclass=_AnyMeta):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue