mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 11:16:07 -04:00
Use inline type hints in http/federation/
, storage/
and util/
(#10381)
This commit is contained in:
parent
3acf85c85f
commit
bdfde6dca1
38 changed files with 149 additions and 161 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue