mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-10-07 20:54:32 +08:00
update allowlist comment for SupportsAbs and SupportsRound (#13380)
The answer to the question is that mypy infers it just fine, but stubtest doesn't check for attributes inherited from the metaclass because that's almost never what we want. In this case, the runtime implementation doesn't get __type_params__ from builtins.type either. It's actually defined for the class due to the use of PEP-695 syntax.
This commit is contained in:
1 parent
614e9499f1
commit
e55c13a612
2 files changed
+2
-4
No files matched your search
@@ -136,8 +136,7 @@ typing.ParamSpecKwargs.__mro_entries__
|
||||
typing.TypeVar.__mro_entries__
|
||||
typing.TypeVarTuple.__mro_entries__
|
||||
|
||||
# TODO: mypy should infer that this attribute is inherited from builtins.type;
|
||||
# why doesn't it infer this?
|
||||
# These exist at runtime because the protocol uses PEP-695 syntax in CPython
|
||||
typing.SupportsAbs.__type_params__
|
||||
typing.SupportsRound.__type_params__
|
||||
typing_extensions.SupportsAbs.__type_params__
|
||||
|
||||
@@ -126,8 +126,7 @@ typing.ParamSpecKwargs.__mro_entries__
|
||||
typing.TypeVar.__mro_entries__
|
||||
typing.TypeVarTuple.__mro_entries__
|
||||
|
||||
# TODO: mypy should infer that this attribute is inherited from builtins.type;
|
||||
# why doesn't it infer this?
|
||||
# These exist at runtime because the protocol uses PEP-695 syntax in CPython
|
||||
typing.SupportsAbs.__type_params__
|
||||
typing.SupportsRound.__type_params__
|
||||
typing_extensions.SupportsAbs.__type_params__
|
||||
|
||||
Reference in new issue
Block a user