build(deps-dev): Bump mypy from 0.931 to 0.942

Bumps [mypy](https://github.com/python/mypy) from 0.931 to 0.942.
- [Release notes](https://github.com/python/mypy/releases)
- [Commits](https://github.com/python/mypy/compare/v0.931...v0.942)

---
updated-dependencies:
- dependency-name: mypy
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Bump mypy from 0.931 to 0.942

after mypy 0.940, it disabled all class scoped imports because it will
cause crashes.

1. upgrade mypy from 0.931 to 0.942
2. Solve the error `class scoped import` in mypy 0.942
This commit is contained in:
dependabot[bot]
2022-03-29 10:05:08 +05:45
committed by Saugat Pachhai
parent ead7724824
commit 5a7790dcd5
3 changed files with 9 additions and 10 deletions
+1 -2
View File
@@ -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(
+7 -7
View File
@@ -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
+1 -1
View File
@@ -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