Skip to content

Commit 591ba81

Browse files
author
David Robertson
committed
Fix overload-readme sample
Implicit optionals are no longer accepted by mypy 1.0
1 parent e6f21bc commit 591ba81

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/samples/overload_readme.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ def say() -> str:
1414
def say(count: int) -> List[str]:
1515
...
1616

17-
def say(count: int = None) -> Union[str, List[str]]:
17+
def say(count: Optional[int] = None) -> Union[str, List[str]]:
1818
pass
1919

2020

@@ -28,7 +28,7 @@ def say(self) -> str:
2828
def say(self, count: int) -> List[str]:
2929
...
3030

31-
def say(self, count: int = None) -> Union[str, List[str]]:
31+
def say(self, count: Optional[int] = None) -> Union[str, List[str]]:
3232
if count is None:
3333
return "Mooo"
3434
return ["Mooo"] * count

0 commit comments

Comments
 (0)