Skip to content

Commit

Permalink
comment
Browse files Browse the repository at this point in the history
  • Loading branch information
jab committed Mar 10, 2022
1 parent 5d76ab7 commit bd07620
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bidict/_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -497,15 +497,15 @@ def _init_from(self, other: MapOrIterItems[KT, VT]) -> None:
def __or__(self: BT, other: t.Mapping[KT, VT]) -> BT:
"""Return self|other."""
if not isinstance(other, t.Mapping):
return NotImplemented
return NotImplemented # flagged by pyright
new = self.copy()
new._update(other, rbof=False)
return new

def __ror__(self: BT, other: t.Mapping[KT, VT]) -> BT:
"""Return other|self."""
if not isinstance(other, t.Mapping):
return NotImplemented
return NotImplemented # flagged by pyright
new = self.__class__(other)
new._update(self, rbof=False)
return new
Expand Down

0 comments on commit bd07620

Please sign in to comment.