File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -667,11 +667,13 @@ Keyword arguments in a direct metaclass call (such as the last two calls in the
667667example above) require no special handling: they are validated as part of
668668evaluating the call using the standard constructor call rules.
669669
670- Type checkers should honor the evaluated retunr type of the implied metaclass call,
671- even if the evaluated type isn't a class::
670+ Type checkers should honor the evaluated return type of the implied metaclass call,
671+ even if the evaluated type isn't a class:
672+
673+ ::
672674
673675 class Meta(type):
674- def __new__(cls , *args: object, **kwargs: obect ) -> int:
676+ def __new__(mcls , *args: object, **kwargs: object ) -> int:
675677 return 1
676678
677679 class MyClass6(metaclass=Meta):
@@ -699,7 +701,7 @@ Type checkers may validate the implied call to :attr:`!__prepare__`:
699701 return super().__new__(mcls, name, bases, namespace)
700702
701703 # The 'key' argument may result in a type checker error:
702- class MyClass6 (metaclass=Meta, key=3):
704+ class MyClass7 (metaclass=Meta, key=3):
703705 pass
704706
705707The ``metaclass `` argument can also be an arbitrary callable that is not a subclass
You can’t perform that action at this time.
0 commit comments