diff options
author | Jonathan de Jong <jonathan@automatia.nl> | 2021-07-15 18:46:54 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-15 12:46:54 -0400 |
commit | bdfde6dca11a9468372b3c9b327ad3327cbdbe4a (patch) | |
tree | e3185688882f25f08cc0aefa80d8e1944c5004d9 /synapse/storage/prepare_database.py | |
parent | Reduce likelihood of Postgres table scanning `state_groups_state`. (#10359) (diff) | |
download | synapse-bdfde6dca11a9468372b3c9b327ad3327cbdbe4a.tar.xz |
Use inline type hints in `http/federation/`, `storage/` and `util/` (#10381)
Diffstat (limited to 'synapse/storage/prepare_database.py')
-rw-r--r-- | synapse/storage/prepare_database.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/synapse/storage/prepare_database.py b/synapse/storage/prepare_database.py index 683e5e3b90..82a7686df0 100644 --- a/synapse/storage/prepare_database.py +++ b/synapse/storage/prepare_database.py @@ -256,7 +256,7 @@ def _setup_new_database( for database in databases ) - directory_entries = [] # type: List[_DirectoryListing] + directory_entries: List[_DirectoryListing] = [] for directory in directories: directory_entries.extend( _DirectoryListing(file_name, os.path.join(directory, file_name)) @@ -424,10 +424,10 @@ def _upgrade_existing_database( directories.append(os.path.join(schema_path, database, "delta", str(v))) # Used to check if we have any duplicate file names - file_name_counter = Counter() # type: CounterType[str] + file_name_counter: CounterType[str] = Counter() # Now find which directories have anything of interest. - directory_entries = [] # type: List[_DirectoryListing] + directory_entries: List[_DirectoryListing] = [] for directory in directories: logger.debug("Looking for schema deltas in %s", directory) try: |