Skip to content

Commit

Permalink
Fix typos, add a type signature
Browse files Browse the repository at this point in the history
Signed-off-by: Mihai Maruseac <[email protected]>
  • Loading branch information
mihaimaruseac committed Jul 20, 2024
1 parent 7e0d225 commit 0a06edf
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions model_signing/serialization/serialize_by_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,9 +185,7 @@ class _FileDigestTree:
Every leaf in the tree is a file, paired with its digest. Every intermediate
node represents a directory. We need to pair every directory with a digest,
in a top-down fashion.
Every internal node has a list of children, sorted alphabetically.
in a bottom-up fashion.
"""

def __init__(
Expand All @@ -211,7 +209,7 @@ def build_tree(
cls, items: Iterable[manifest.FileManifestItem]
) -> "_FileDigestTree":
"""Builds a tree out of the sequence of manifest items."""
path_to_node = {}
path_to_node: dict[pathlib.PurePath, _FileDigestTree] = {}

for file_item in items:
file = file_item.path
Expand Down

0 comments on commit 0a06edf

Please sign in to comment.