diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 18d911256d3..5f06add1eb3 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -2,7 +2,7 @@ exclude: 'src/pip/_vendor/' repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.4.0 + rev: v4.5.0 hooks: - id: check-builtin-literals - id: check-added-large-files @@ -16,19 +16,19 @@ repos: - id: trailing-whitespace exclude: .patch -- repo: https://github.com/psf/black - rev: 23.7.0 +- repo: https://github.com/psf/black-pre-commit-mirror + rev: 23.12.1 hooks: - id: black - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.1.4 + rev: v0.1.9 hooks: - id: ruff args: [--fix, --exit-non-zero-on-fix] - repo: https://github.com/pre-commit/mirrors-mypy - rev: v1.6.1 + rev: v1.8.0 hooks: - id: mypy exclude: tests/data diff --git a/src/pip/_internal/req/req_uninstall.py b/src/pip/_internal/req/req_uninstall.py index 3ca10098cf9..707fde1b2b9 100644 --- a/src/pip/_internal/req/req_uninstall.py +++ b/src/pip/_internal/req/req_uninstall.py @@ -172,8 +172,7 @@ def compress_for_output_listing(paths: Iterable[str]) -> Tuple[Set[str], Set[str folders.add(os.path.dirname(path)) files.add(path) - # probably this one https://github.com/python/mypy/issues/390 - _normcased_files = set(map(os.path.normcase, files)) # type: ignore + _normcased_files = set(map(os.path.normcase, files)) folders = compact(folders) diff --git a/tests/unit/test_vcs.py b/tests/unit/test_vcs.py index 5291f129cf7..a52a6217e77 100644 --- a/tests/unit/test_vcs.py +++ b/tests/unit/test_vcs.py @@ -458,8 +458,7 @@ def test_version_control__run_command__fails( with mock.patch("pip._internal.vcs.versioncontrol.call_subprocess") as call: call.side_effect = exc_cls with pytest.raises(BadCommand, match=msg_re.format(name=vcs_cls.name)): - # https://github.com/python/mypy/issues/3283 - vcs_cls.run_command([]) # type: ignore[arg-type] + vcs_cls.run_command([]) @pytest.mark.parametrize(