switch from mypy to ty (#36961)

This commit is contained in:
Adeeb Shihadeh
2025-12-28 10:42:49 -08:00
committed by GitHub
parent 85cdb2ed9a
commit ea01a53711
37 changed files with 160 additions and 162 deletions
+2 -2
View File
@@ -168,7 +168,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):
progress: Callable[[int], None] | None = None):
stats: dict[str, int] = defaultdict(int)
mode = 'rb+' if os.path.exists(out_path) else 'wb'
@@ -208,7 +208,7 @@ def extract_directory(target: list[Chunk],
sources: list[tuple[str, ChunkReader, ChunkDict]],
out_path: str,
tmp_file: str,
progress: Callable[[int], None] = None):
progress: Callable[[int], None] | None = None):
"""extract a directory stored as a casync tar archive"""
stats = extract(target, sources, tmp_file, progress)