mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-06-20 19:44:07 -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
|
@ -83,7 +83,10 @@ class DeleteDevicesRestServlet(RestServlet):
|
|||
assert_params_in_dict(body, ["devices"])
|
||||
|
||||
await self.auth_handler.validate_user_via_ui_auth(
|
||||
requester, request, body, "remove device(s) from your account",
|
||||
requester,
|
||||
request,
|
||||
body,
|
||||
"remove device(s) from your account",
|
||||
)
|
||||
|
||||
await self.device_handler.delete_devices(
|
||||
|
@ -129,7 +132,10 @@ class DeviceRestServlet(RestServlet):
|
|||
raise
|
||||
|
||||
await self.auth_handler.validate_user_via_ui_auth(
|
||||
requester, request, body, "remove a device from your account",
|
||||
requester,
|
||||
request,
|
||||
body,
|
||||
"remove a device from your account",
|
||||
)
|
||||
|
||||
await self.device_handler.delete_device(requester.user.to_string(), device_id)
|
||||
|
@ -206,7 +212,9 @@ class DehydratedDeviceServlet(RestServlet):
|
|||
|
||||
if "device_data" not in submission:
|
||||
raise errors.SynapseError(
|
||||
400, "device_data missing", errcode=errors.Codes.MISSING_PARAM,
|
||||
400,
|
||||
"device_data missing",
|
||||
errcode=errors.Codes.MISSING_PARAM,
|
||||
)
|
||||
elif not isinstance(submission["device_data"], dict):
|
||||
raise errors.SynapseError(
|
||||
|
@ -259,11 +267,15 @@ class ClaimDehydratedDeviceServlet(RestServlet):
|
|||
|
||||
if "device_id" not in submission:
|
||||
raise errors.SynapseError(
|
||||
400, "device_id missing", errcode=errors.Codes.MISSING_PARAM,
|
||||
400,
|
||||
"device_id missing",
|
||||
errcode=errors.Codes.MISSING_PARAM,
|
||||
)
|
||||
elif not isinstance(submission["device_id"], str):
|
||||
raise errors.SynapseError(
|
||||
400, "device_id must be a string", errcode=errors.Codes.INVALID_PARAM,
|
||||
400,
|
||||
"device_id must be a string",
|
||||
errcode=errors.Codes.INVALID_PARAM,
|
||||
)
|
||||
|
||||
result = await self.device_handler.rehydrate_device(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue