mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-01-20 10:02:51 +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:
@@ -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