mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-06 11:14:59 -04:00
Update black, and run auto formatting over the codebase (#9381)
- Update black version to the latest
- Run black auto formatting over the codebase
- Run autoformatting according to [`docs/code_style.md
`](80d6dc9783/docs/code_style.md
)
- Update `code_style.md` docs around installing black to use the correct version
This commit is contained in:
parent
5636e597c3
commit
0a00b7ff14
271 changed files with 2802 additions and 1713 deletions
|
@ -280,8 +280,7 @@ class ClientIpBackgroundUpdateStore(SQLBaseStore):
|
|||
return batch_size
|
||||
|
||||
async def _devices_last_seen_update(self, progress, batch_size):
|
||||
"""Background update to insert last seen info into devices table
|
||||
"""
|
||||
"""Background update to insert last seen info into devices table"""
|
||||
|
||||
last_user_id = progress.get("last_user_id", "")
|
||||
last_device_id = progress.get("last_device_id", "")
|
||||
|
@ -363,8 +362,7 @@ class ClientIpWorkerStore(ClientIpBackgroundUpdateStore):
|
|||
|
||||
@wrap_as_background_process("prune_old_user_ips")
|
||||
async def _prune_old_user_ips(self):
|
||||
"""Removes entries in user IPs older than the configured period.
|
||||
"""
|
||||
"""Removes entries in user IPs older than the configured period."""
|
||||
|
||||
if self.user_ips_max_age is None:
|
||||
# Nothing to do
|
||||
|
@ -565,7 +563,11 @@ class ClientIpStore(ClientIpWorkerStore):
|
|||
results = {}
|
||||
|
||||
for key in self._batch_row_update:
|
||||
uid, access_token, ip, = key
|
||||
(
|
||||
uid,
|
||||
access_token,
|
||||
ip,
|
||||
) = key
|
||||
if uid == user_id:
|
||||
user_agent, _, last_seen = self._batch_row_update[key]
|
||||
results[(access_token, ip)] = (user_agent, last_seen)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue