Skip to content

Commit

Permalink
Merge pull request #12454 from sbidoul/upgrade-linters-sbi
Browse files Browse the repository at this point in the history
Upgrade linters
  • Loading branch information
sbidoul authored Jan 15, 2024
2 parents 9f5082e + f63d4c1 commit 5efa3e8
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 9 deletions.
10 changes: 5 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
3 changes: 1 addition & 2 deletions src/pip/_internal/req/req_uninstall.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
3 changes: 1 addition & 2 deletions tests/unit/test_vcs.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 5efa3e8

Please sign in to comment.