From 0def298b8c10ed838f6a46740fa317486c285f3f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 10 Nov 2023 15:40:57 +0545 Subject: [PATCH] build(deps-dev): bump mypy from 1.5.1 to 1.6.1 (#10035) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * build(deps-dev): bump mypy from 1.5.1 to 1.6.1 Bumps [mypy](https://github.com/python/mypy) from 1.5.1 to 1.6.1. - [Changelog](https://github.com/python/mypy/blob/master/CHANGELOG.md) - [Commits](https://github.com/python/mypy/compare/v1.5.1...v1.6.1) --- updated-dependencies: - dependency-name: mypy dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] * pre-commit autoupdate * mypy fixes --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Saugat Pachhai (सौगात) --- .pre-commit-config.yaml | 4 ++-- dvc/dependency/param.py | 2 +- dvc/repo/ls.py | 4 ++-- pyproject.toml | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 3a73ae2fa..3c441edcb 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -6,7 +6,7 @@ ci: repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.4.0 + rev: v4.5.0 hooks: - id: check-added-large-files - id: check-case-conflict @@ -28,7 +28,7 @@ repos: args: [--fix, --exit-non-zero-on-fix] - id: ruff-format - repo: https://github.com/codespell-project/codespell - rev: v2.2.5 + rev: v2.2.6 hooks: - id: codespell additional_dependencies: ["tomli"] diff --git a/dvc/dependency/param.py b/dvc/dependency/param.py index 542c592c5..e30439018 100644 --- a/dvc/dependency/param.py +++ b/dvc/dependency/param.py @@ -132,8 +132,8 @@ class ParamsDependency(Dependency): from funcy import ldistinct status: Dict[str, Any] = defaultdict(dict) - assert isinstance(self.hash_info.value, dict) info = self.hash_info.value if self.hash_info else {} + assert isinstance(info, dict) actual = self.read_params() # NOTE: we want to preserve the order of params as specified in the diff --git a/dvc/repo/ls.py b/dvc/repo/ls.py index e4d00a554..3e3e75f2e 100644 --- a/dvc/repo/ls.py +++ b/dvc/repo/ls.py @@ -1,5 +1,5 @@ import os -from typing import TYPE_CHECKING, Optional +from typing import TYPE_CHECKING, Any, Dict, Optional, Union if TYPE_CHECKING: from dvc.fs.dvc import DVCFileSystem @@ -13,7 +13,7 @@ def ls( rev: Optional[str] = None, recursive: Optional[bool] = None, dvc_only: bool = False, - config: Optional[str] = None, + config: Union[None, Dict[str, Any], str] = None, remote: Optional[str] = None, remote_config: Optional[dict] = None, ): diff --git a/pyproject.toml b/pyproject.toml index 4a88de07d..740d858b2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -76,7 +76,7 @@ gdrive = ["dvc-gdrive==2.20"] gs = ["dvc-gs==2.22.1"] hdfs = ["dvc-hdfs==2.19"] lint = [ - "mypy==1.5.1", + "mypy==1.6.1", "types-colorama", "types-psutil", "types-pyinstaller",