@@ -254,7 +254,7 @@ def extract_database(
254254 # This is because we may have different versions of the
255255 # same file across many tars.
256256 insert_idx : int
257- iter_inx : int
257+ iter_idx : int
258258 insert_idx , iter_idx = 0 , 1
259259 for iter_idx in range (1 , len (matches )):
260260 # If the filenames are unique, just increment insert_idx.
@@ -351,10 +351,10 @@ def multiprocess_extract(
351351 for db_row in matches :
352352 tar = db_row .tar
353353 workers_idx : int
354- for worker_idx in range (len (workers_to_tars )):
355- if tar in workers_to_tars [worker_idx ]:
354+ for workers_idx in range (len (workers_to_tars )):
355+ if tar in workers_to_tars [workers_idx ]:
356356 # This worker gets this db_row.
357- workers_to_matches [worker_idx ].append (db_row )
357+ workers_to_matches [workers_idx ].append (db_row )
358358
359359 tar_ordering : List [str ] = sorted ([tar for tar in tar_to_size ])
360360 monitor : parallel .PrintMonitor = parallel .PrintMonitor (tar_ordering )
@@ -444,8 +444,7 @@ def extractFiles( # noqa: C901
444444 if multiprocess_worker :
445445 # All messages to the logger will now be sent to
446446 # this queue, instead of sys.stdout.
447- # error: Argument 1 to "StreamHandler" has incompatible type "PrintQueue"; expected "Optional[IO[str]]"
448- sh = logging .StreamHandler (multiprocess_worker .print_queue ) # type: ignore
447+ sh = logging .StreamHandler (multiprocess_worker .print_queue )
449448 sh .setLevel (logging .DEBUG )
450449 formatter : logging .Formatter = logging .Formatter ("%(levelname)s: %(message)s" )
451450 sh .setFormatter (formatter )
@@ -539,8 +538,7 @@ def extractFiles( # noqa: C901
539538 # error: Name 'tarfile.ExFileObject' is not defined
540539 extracted_file : Optional [tarfile .ExFileObject ] = tar .extractfile (tarinfo ) # type: ignore
541540 if extracted_file :
542- # error: Name 'tarfile.ExFileObject' is not defined
543- fin : tarfile .ExFileObject = extracted_file # type: ignore
541+ fin : tarfile .ExFileObject = extracted_file
544542 else :
545543 raise TypeError ("Invalid extracted_file={}" .format (extracted_file ))
546544 try :
0 commit comments