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 ``[]``.
683
683
from typing import Self
684
684
685
685
class Foo:
686
- def returns_self (self) -> Self:
686
+ def return_self (self) -> Self:
687
687
...
688
688
return self
689
689
@@ -696,7 +696,7 @@ These can be used as types in annotations and do not support ``[]``.
696
696
Self = TypeVar("Self", bound="Foo")
697
697
698
698
class Foo:
699
- def returns_self (self: Self) -> Self:
699
+ def return_self (self: Self) -> Self:
700
700
...
701
701
return self
702
702
@@ -707,7 +707,7 @@ These can be used as types in annotations and do not support ``[]``.
707
707
...
708
708
return self
709
709
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
711
711
``Foo `` as the return type and not ``SubclassOfFoo ``.
712
712
713
713
Other common use cases include:
Original file line number Diff line number Diff line change @@ -569,7 +569,7 @@ def Self(self, parameters):
569
569
from typing import Self
570
570
571
571
class Foo:
572
- def returns_self (self) -> Self:
572
+ def return_self (self) -> Self:
573
573
...
574
574
return self
575
575
You can’t perform that action at this time.
0 commit comments