Skip to content

Commit ba9f100

Browse files
committed
add type Self to return
1 parent 9d09e10 commit ba9f100

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/source_files/py/src.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from task import Task
1+
from typing import Self
22

33
def log(msg: str) -> None:
44
print(f'msg: {msg}')
@@ -9,7 +9,7 @@ def __init__(self, name: str, duration: int):
99
self.duration = duration
1010
print(f'name: {name}, duration: {duration}')
1111

12-
def abort(self, delay:float) -> Task:
12+
def abort(self, delay:float) -> Self:
1313
log(f'Task {self} aborted')
1414
return self
1515

0 commit comments

Comments
 (0)