Skip to content

Commit

Permalink
Better workaround for python/mypy#12390
Browse files Browse the repository at this point in the history
  • Loading branch information
jab committed Mar 21, 2022
1 parent e4ff445 commit 6cb30f7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bidict/_bidict.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,10 @@ def clear(self) -> None:
self._fwdm.clear()
self._invm.clear()

@t.overload # type: ignore [override] # https://github.com/python/mypy/issues/12390
@t.overload
def pop(self, __key: KT) -> VT: ...
@t.overload
def pop(self, __key: KT, __default: DT) -> t.Union[VT, DT]: ...
def pop(self, __key: KT, __default: DT = ...) -> t.Union[VT, DT]: ...

def pop(self, key: KT, default: ODT[DT] = MISSING) -> t.Union[VT, DT]:
"""*x.pop(k[, d]) → v*
Expand Down

0 comments on commit 6cb30f7

Please sign in to comment.