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:
Stephen Morton
2025-01-09 14:00:54 -08:00
committed by GitHub
parent 614e9499f1
commit e55c13a612
2 changed files with 2 additions and 4 deletions

View File

@@ -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__

View File

@@ -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__