Skip to content

Commit 9c216a9

Browse files
authored
Update mismatched_return_type_example.py
Added type for list
1 parent 38c8d94 commit 9c216a9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
def get_number_of_titles(titles: list) -> str:
1+
def get_number_of_titles(titles: list[str]) -> str:
22
return len(titles)
33

44

55
games = ["Dragon Quest", "Final Fantasy", "Age of Empires"]
66
print(f"Number of titles: {get_number_of_titles(games)}")
7+

0 commit comments

Comments
 (0)