typing module documentation
Typo description
A typo in docstring for override decorator. Under Usage:: we see the following code.
class Base:
def method(self) -> None: ...
pass
class Child(Base):
@override
def method(self) -> None:
super().method()
Both ... and pass are used in Base's class method. Since ... has already been used, pass statement does not relate to the method at all, causing IndentationError.
Suggested solution: remove ...
class Base:
def method(self) -> None:
pass
class Child(Base):
@override
def method(self) -> None:
super().method()
|
def method(self) -> None: ... |
Linked PRs
typingmodule documentationTypo description
A typo in docstring for
overridedecorator. UnderUsage::we see the following code.Both
...andpassare used inBase's class method. Since...has already been used,passstatement does not relate to the method at all, causingIndentationError.Suggested solution: remove
...cpython/Lib/typing.py
Line 3348 in 985679f
Linked PRs
typing.overridedocstring #112158typing.overridedocstring (GH-112158) #112162