mirror of
https://github.com/zulip/zulip.git
synced 2025-11-17 20:41:46 +00:00
ruff: Fix PLW0108 Lambda may be unnecessary.
This is a preview rule, not yet enabled by default. Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
committed by
Tim Abbott
parent
553f268b04
commit
d748ec8d52
@@ -42,8 +42,8 @@ class StateHandler:
|
||||
|
||||
def __init__(self, user_profile: UserProfile) -> None:
|
||||
self.user_profile = user_profile
|
||||
self.marshal: Callable[[object], str] = lambda obj: json.dumps(obj)
|
||||
self.demarshal: Callable[[str], object] = lambda obj: json.loads(obj)
|
||||
self.marshal: Callable[[object], str] = json.dumps
|
||||
self.demarshal: Callable[[str], object] = json.loads
|
||||
|
||||
def get(self, key: str) -> object:
|
||||
return self.demarshal(get_bot_storage(self.user_profile, key))
|
||||
|
||||
Reference in New Issue
Block a user