Skip to content

Commit

Permalink
tree: fix types
Browse files Browse the repository at this point in the history
  • Loading branch information
efiop committed Jan 15, 2023
1 parent e92dce3 commit 808a301
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/dvc_data/hashfile/tree.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,14 @@
from typing import TYPE_CHECKING, Dict, Final, Iterable, Optional, Tuple

from dvc_objects.errors import ObjectFormatError
from dvc_objects.obj import Object
from funcy import cached_property

from ..hashfile.hash import hash_file
from ..hashfile.meta import Meta
from ..hashfile.obj import HashFile

if TYPE_CHECKING:
from dvc_objects.db import ObjectDB

from ..hashfile.db import HashFileDB
from ..hashfile.hash_info import HashInfo

logger = logging.getLogger(__name__)
Expand All @@ -28,9 +26,9 @@ class MergeError(Exception):


def _try_load(
odbs: Iterable["ObjectDB"],
odbs: Iterable["HashFileDB"],
hash_info: "HashInfo",
) -> Optional["Object"]:
) -> Optional["HashFile"]:
for odb in odbs:
if not odb:
continue
Expand Down Expand Up @@ -203,7 +201,7 @@ def filter(self, prefix: Tuple[str]) -> Optional["Tree"]:
pass
return tree

def get_obj(self, odb, prefix: Tuple[str]) -> Optional[Object]:
def get_obj(self, odb, prefix: Tuple[str]) -> Optional[HashFile]:
"""Return object at the specified prefix in this tree.
Returns None if no object exists at the specified prefix.
Expand Down

0 comments on commit 808a301

Please sign in to comment.