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:
Eric Eastwood 2021-02-16 16:32:34 -06:00 committed by GitHub
parent 5636e597c3
commit 0a00b7ff14
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
271 changed files with 2802 additions and 1713 deletions

View file

@ -79,13 +79,16 @@ class RegistrationWorkerStore(CacheInvalidationWorkerStore):
# call `find_max_generated_user_id_localpart` each time, which is
# expensive if there are many entries.
self._user_id_seq = build_sequence_generator(
database.engine, find_max_generated_user_id_localpart, "user_id_seq",
database.engine,
find_max_generated_user_id_localpart,
"user_id_seq",
)
self._account_validity = hs.config.account_validity
if hs.config.run_background_tasks and self._account_validity.enabled:
self._clock.call_later(
0.0, self._set_expiration_date_when_missing,
0.0,
self._set_expiration_date_when_missing,
)
# Create a background job for culling expired 3PID validity tokens