1
0
Fork 0
mirror of https://github.com/borgbackup/borg.git synced 2025-02-24 15:12:00 +00:00

add type annotation for mypy

This commit is contained in:
Thomas Waldmann 2023-11-18 18:31:43 +01:00
parent 046f9fe392
commit 2d86b7e1ac
No known key found for this signature in database
GPG key ID: 243ACFA951F78E01

View file

@ -11,6 +11,7 @@
from datetime import datetime, timezone
from functools import partial
from itertools import islice
from typing import Callable, DefaultDict
from .constants import * # NOQA
from .hashindex import NSIndexEntry, NSIndex, NSIndex1, hashindex_variant
@ -48,7 +49,7 @@
# may not be able to handle the new tags.
MAX_TAG_ID = 15
FreeSpace = partial(defaultdict, int)
FreeSpace: Callable[[], DefaultDict] = partial(defaultdict, int)
def header_size(tag):