Skip to content

Commit 7fff120

Browse files
committed
Typos, nits
1 parent 216020a commit 7fff120

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

‎docs/spec/constructors.rst‎

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -667,11 +667,13 @@ Keyword arguments in a direct metaclass call (such as the last two calls in the
667667
example above) require no special handling: they are validated as part of
668668
evaluating 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

705707
The ``metaclass`` argument can also be an arbitrary callable that is not a subclass

0 commit comments

Comments
 (0)