Skip to content

Commit 3f83195

Browse files
mrkmndzJelleZijlstra
authored andcommitted
Fixing signature for Mapping.get's default parameter (#2810)
1 parent 68a9b0a commit 3f83195

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

stdlib/2/typing.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ class Mapping(Iterable[_KT], Container[_KT], Generic[_KT, _VT_co]):
255255
@overload
256256
def get(self, k: _KT) -> Optional[_VT_co]: ...
257257
@overload
258-
def get(self, k: _KT, default: Union[_VT_co, _T]) -> Union[_VT_co, _T]: ...
258+
def get(self, k: _KT, default: _T) -> Union[_VT_co, _T]: ...
259259
def keys(self) -> list[_KT]: ...
260260
def values(self) -> list[_VT_co]: ...
261261
def items(self) -> list[Tuple[_KT, _VT_co]]: ...

stdlib/3/typing.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,7 @@ class Mapping(_Collection[_KT], Generic[_KT, _VT_co]):
364364
@overload
365365
def get(self, k: _KT) -> Optional[_VT_co]: ...
366366
@overload
367-
def get(self, k: _KT, default: Union[_VT_co, _T]) -> Union[_VT_co, _T]: ...
367+
def get(self, k: _KT, default: _T) -> Union[_VT_co, _T]: ...
368368
def items(self) -> AbstractSet[Tuple[_KT, _VT_co]]: ...
369369
def keys(self) -> AbstractSet[_KT]: ...
370370
def values(self) -> ValuesView[_VT_co]: ...

0 commit comments

Comments
 (0)