From 54917e3255fcd6ec6dc6c60121048c7ece9ed21c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Saugat=20Pachhai=20=28=E0=A4=B8=E0=A5=8C=E0=A4=97=E0=A4=BE?= =?UTF-8?q?=E0=A4=A4=29?= Date: Wed, 18 May 2022 11:11:15 +0545 Subject: [PATCH] dvc.objects: fix typing imports --- dvc/data/checkout.py | 2 +- dvc/data/db/index.py | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/dvc/data/checkout.py b/dvc/data/checkout.py index 756f2832d..e935acb01 100644 --- a/dvc/data/checkout.py +++ b/dvc/data/checkout.py @@ -1,12 +1,12 @@ import logging from itertools import chain +from typing import Optional from dvc import prompt from dvc.exceptions import CacheLinkError, CheckoutError, ConfirmRemoveError from dvc.ignore import DvcIgnoreFilter from dvc.objects.fs._callback import FsspecCallback from dvc.objects.fs.generic import test_links, transfer -from dvc.types import Optional from .diff import ROOT from .diff import diff as odiff diff --git a/dvc/data/db/index.py b/dvc/data/db/index.py index 7c8c5623f..2063ed46a 100644 --- a/dvc/data/db/index.py +++ b/dvc/data/db/index.py @@ -6,7 +6,7 @@ from typing import TYPE_CHECKING, Iterable, Set from dvc.objects.errors import ObjectDBError if TYPE_CHECKING: - from dvc.types import StrPath + from dvc.objects.fs.base import AnyFSPath logger = logging.getLogger(__name__) @@ -15,7 +15,7 @@ class ObjectDBIndexBase(ABC): @abstractmethod def __init__( self, - tmp_dir: "StrPath", + tmp_dir: "AnyFSPath", name: str, ): pass @@ -53,7 +53,7 @@ class ObjectDBIndexNoop(ObjectDBIndexBase): def __init__( self, - tmp_dir: "StrPath", + tmp_dir: "AnyFSPath", name: str, ): # pylint: disable=super-init-not-called pass @@ -85,7 +85,7 @@ class ObjectDBIndex(ObjectDBIndexBase): def __init__( self, - tmp_dir: "StrPath", + tmp_dir: "AnyFSPath", name: str, ): # pylint: disable=super-init-not-called from dvc.objects.cache import Cache, Index