Skip to content

Commit 5e8b427

Browse files
committed
testing typing using mypy
1 parent f0094d1 commit 5e8b427

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

example.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,8 @@ def my_max(*args: int) -> int:
8484
Z = TypeVar('Z')
8585
X = TypeVar('X')
8686

87-
def sentence(cb: Callable[[Z], X], txt: Z) -> X:
88-
return cb(txt)
87+
def sentence(cb: Callable[[Z], X], txt: Z) -> list[X]:
88+
return [cb(txt)]
8989

9090
sentence (lambda x: x.upper(), 'ala ma kota')
9191
sentence (lambda x: str(x).upper(), '42')

0 commit comments

Comments
 (0)