diff options
author | Patrick Cloke <clokep@users.noreply.github.com> | 2023-10-05 11:07:38 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-05 11:07:38 -0400 |
commit | fa907025f4b263d27c2b338fb0fe86d257d74fa8 (patch) | |
tree | 325bfac7ba840c71a0b9a7b3e7a72e3549f03c54 /synapse/push/__init__.py | |
parent | Add __slots__ to replication commands. (#16429) (diff) | |
download | synapse-fa907025f4b263d27c2b338fb0fe86d257d74fa8.tar.xz |
Remove manys calls to cursor_to_dict (#16431)
This avoids calling cursor_to_dict and then immediately unpacking the values in the dict for other users. By not creating the intermediate dictionary we can avoid allocating the dictionary and strings for the keys, which should generally be more performant. Additionally this improves type hints by avoid Dict[str, Any] dictionaries coming out of the database layer.
Diffstat (limited to 'synapse/push/__init__.py')
-rw-r--r-- | synapse/push/__init__.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/synapse/push/__init__.py b/synapse/push/__init__.py index 9e5eb2a445..4d405f2a0c 100644 --- a/synapse/push/__init__.py +++ b/synapse/push/__init__.py @@ -101,7 +101,7 @@ if TYPE_CHECKING: class PusherConfig: """Parameters necessary to configure a pusher.""" - id: Optional[str] + id: Optional[int] user_name: str profile_tag: str |