mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-01 23:08:43 +01:00
build(deps): bump mypy from 1.11.2 to 1.12.0 (#10586)
* build(deps): bump mypy from 1.11.2 to 1.12.0 Bumps [mypy](https://github.com/python/mypy) from 1.11.2 to 1.12.0. - [Changelog](https://github.com/python/mypy/blob/master/CHANGELOG.md) - [Commits](https://github.com/python/mypy/compare/v1.11.2...v1.12.0) --- updated-dependencies: - dependency-name: mypy dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> * fix mypy complaintes --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Ivan Shcheklein <[email protected]>
This commit is contained in:
co-authored by
Ivan Shcheklein
parent
d5054ce861
commit
683ae7a951
@@ -176,8 +176,9 @@ class Container(Node, ABC):
|
|||||||
return value
|
return value
|
||||||
if isinstance(value, (list, dict)):
|
if isinstance(value, (list, dict)):
|
||||||
assert meta
|
assert meta
|
||||||
container = CtxDict if isinstance(value, dict) else CtxList
|
if isinstance(value, dict):
|
||||||
return container(value, meta=meta)
|
return CtxDict(value, meta=meta)
|
||||||
|
return CtxList(value, meta=meta)
|
||||||
msg = f"Unsupported value of type '{type(value).__name__}' in '{meta}'"
|
msg = f"Unsupported value of type '{type(value).__name__}' in '{meta}'"
|
||||||
raise TypeError(msg)
|
raise TypeError(msg)
|
||||||
|
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ def _load_data(
|
|||||||
):
|
):
|
||||||
open_fn = fs.open if fs else open
|
open_fn = fs.open if fs else open
|
||||||
encoding = "utf-8"
|
encoding = "utf-8"
|
||||||
with open_fn(path, encoding=encoding, **kwargs) as fd: # type: ignore[operator]
|
with open_fn(path, encoding=encoding, **kwargs) as fd: # type: ignore[arg-type]
|
||||||
with reraise(UnicodeDecodeError, EncodingError(path, encoding)):
|
with reraise(UnicodeDecodeError, EncodingError(path, encoding)):
|
||||||
return parser(fd.read(), path)
|
return parser(fd.read(), path)
|
||||||
|
|
||||||
@@ -74,7 +74,7 @@ def _dump_data(
|
|||||||
**dumper_args,
|
**dumper_args,
|
||||||
):
|
):
|
||||||
open_fn = fs.open if fs else open
|
open_fn = fs.open if fs else open
|
||||||
with open_fn(path, "w+", encoding="utf-8") as fd: # type: ignore[operator]
|
with open_fn(path, "w+", encoding="utf-8") as fd: # type: ignore[call-overload]
|
||||||
dumper(data, fd, **dumper_args)
|
dumper(data, fd, **dumper_args)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -83,7 +83,7 @@ gdrive = ["dvc-gdrive>=3,<4"]
|
|||||||
gs = ["dvc-gs>=3,<4"]
|
gs = ["dvc-gs>=3,<4"]
|
||||||
hdfs = ["dvc-hdfs>=3,<4"]
|
hdfs = ["dvc-hdfs>=3,<4"]
|
||||||
lint = [
|
lint = [
|
||||||
"mypy==1.11.2",
|
"mypy==1.12.0",
|
||||||
"pandas-stubs",
|
"pandas-stubs",
|
||||||
"types-colorama",
|
"types-colorama",
|
||||||
"types-psutil",
|
"types-psutil",
|
||||||
|
|||||||
Reference in New Issue
Block a user