mypy: use implicit-optional (#31590)

* mypy: set implicit-optional = true

* find and replace '| None = None' -> '= None' in function args
This commit is contained in:
Cameron Clough
2024-02-25 21:29:18 +00:00
committed by GitHub
parent 3520d47955
commit 80da3aee14
25 changed files with 33 additions and 30 deletions
+1 -1
View File
@@ -145,7 +145,7 @@ def build_chunk_dict(chunks: list[Chunk]) -> ChunkDict:
def extract(target: list[Chunk],
sources: list[tuple[str, ChunkReader, ChunkDict]],
out_path: str,
progress: Callable[[int], None] | None = None):
progress: Callable[[int], None] = None):
stats: dict[str, int] = defaultdict(int)
mode = 'rb+' if os.path.exists(out_path) else 'wb'