Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Nov 8, 2024
1 parent 38edb71 commit d615c01
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions znsocket/objects/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -479,7 +479,6 @@ def on_refresh(self, callback: t.Callable[[RefreshDataTypeDict], None]) -> None:

self.socket.refresh_callbacks[self.key] = callback


def update(self, *args, **kwargs):
"""Update the dict with another dict or iterable."""
if len(args) > 1:
Expand Down Expand Up @@ -508,9 +507,7 @@ def update(self, *args, **kwargs):
pipeline.hset(self.key, key, _encode(self, value))
pipeline.execute()


def __or__(self, value: "dict|Dict") -> dict:
if isinstance(value, Dict):
value = dict(value)
return dict(self) | value

0 comments on commit d615c01

Please sign in to comment.