diff --git a/dvc/exceptions.py b/dvc/exceptions.py index 435c11fa8..127d46362 100644 --- a/dvc/exceptions.py +++ b/dvc/exceptions.py @@ -1,4 +1,5 @@ """Exceptions raised by the dvc.""" +from dvc.utils import format_link class DvcException(Exception): @@ -287,7 +288,6 @@ class PathMissingError(DvcException): class RemoteCacheRequiredError(DvcException): def __init__(self, scheme, fs_path): - from dvc.utils import format_link super().__init__( ( @@ -323,7 +323,6 @@ class MergeError(DvcException): class CacheLinkError(DvcException): - from dvc.utils import format_link SUPPORT_LINK = "See {} for more information.".format( format_link( diff --git a/dvc/repo/__init__.py b/dvc/repo/__init__.py index fba275f09..bba3ce1b9 100644 --- a/dvc/repo/__init__.py +++ b/dvc/repo/__init__.py @@ -56,17 +56,17 @@ class Repo: from dvc.repo.add import add from dvc.repo.checkout import checkout from dvc.repo.commit import commit - from dvc.repo.destroy import destroy + from dvc.repo.destroy import destroy # type: ignore[misc] from dvc.repo.diff import diff from dvc.repo.fetch import fetch - from dvc.repo.freeze import freeze, unfreeze + from dvc.repo.freeze import freeze, unfreeze # type: ignore[misc] from dvc.repo.gc import gc - from dvc.repo.get import get as _get - from dvc.repo.get_url import get_url as _get_url - from dvc.repo.imp import imp + from dvc.repo.get import get as _get # type: ignore[misc] + from dvc.repo.get_url import get_url as _get_url # type: ignore[misc] + from dvc.repo.imp import imp # type: ignore[misc] from dvc.repo.imp_url import imp_url - from dvc.repo.install import install - from dvc.repo.ls import ls as _ls + from dvc.repo.install import install # type: ignore[misc] + from dvc.repo.ls import ls as _ls # type: ignore[misc] from dvc.repo.move import move from dvc.repo.pull import pull from dvc.repo.push import push diff --git a/setup.cfg b/setup.cfg index 69339ce29..ff7ec2613 100644 --- a/setup.cfg +++ b/setup.cfg @@ -158,7 +158,7 @@ tests = # and, protected method calls in our tests pylint-plugin-utils==0.7 # type-checking - mypy==0.931 + mypy==0.942 types-requests==2.27.15 types-tabulate==0.8.6 types-toml==0.10.4