File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -683,7 +683,7 @@ These can be used as types in annotations and do not support ``[]``.
683683 from typing import Self
684684
685685 class Foo:
686- def returns_self (self) -> Self:
686+ def return_self (self) -> Self:
687687 ...
688688 return self
689689
@@ -696,7 +696,7 @@ These can be used as types in annotations and do not support ``[]``.
696696 Self = TypeVar("Self", bound="Foo")
697697
698698 class Foo:
699- def returns_self (self: Self) -> Self:
699+ def return_self (self: Self) -> Self:
700700 ...
701701 return self
702702
@@ -707,7 +707,7 @@ These can be used as types in annotations and do not support ``[]``.
707707 ...
708708 return self
709709
710- You should use use :data: `Self ` as calls to ``SubclassOfFoo.returns_self `` would have
710+ You should use :data: `Self ` as calls to ``SubclassOfFoo.return_self `` would have
711711 ``Foo `` as the return type and not ``SubclassOfFoo ``.
712712
713713 Other common use cases include:
Original file line number Diff line number Diff line change @@ -569,7 +569,7 @@ def Self(self, parameters):
569569 from typing import Self
570570
571571 class Foo:
572- def returns_self (self) -> Self:
572+ def return_self (self) -> Self:
573573 ...
574574 return self
575575
You can’t perform that action at this time.
0 commit comments