Skip to content

Commit 86b8b23

Browse files
authored
Merge pull request #12740 from ichard26/bump-pre-commit
2 parents 911bf99 + deededf commit 86b8b23

File tree

4 files changed

+9
-11
lines changed

4 files changed

+9
-11
lines changed

.pre-commit-config.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,18 @@ repos:
1717
exclude: .patch
1818

1919
- repo: https://github.com/psf/black-pre-commit-mirror
20-
rev: 24.4.0
20+
rev: 24.4.2
2121
hooks:
2222
- id: black
2323

2424
- repo: https://github.com/astral-sh/ruff-pre-commit
25-
rev: v0.4.1
25+
rev: v0.4.7
2626
hooks:
2727
- id: ruff
2828
args: [--fix, --exit-non-zero-on-fix]
2929

3030
- repo: https://github.com/pre-commit/mirrors-mypy
31-
rev: v1.9.0
31+
rev: v1.10.0
3232
hooks:
3333
- id: mypy
3434
exclude: tests/data
@@ -54,7 +54,7 @@ repos:
5454
exclude: NEWS.rst # The errors flagged in NEWS.rst are old.
5555

5656
- repo: https://github.com/codespell-project/codespell
57-
rev: v2.2.6
57+
rev: v2.3.0
5858
hooks:
5959
- id: codespell
6060
exclude: AUTHORS.txt|tests/data

src/pip/_internal/cli/parser.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import sys
77
import textwrap
88
from contextlib import suppress
9-
from typing import Any, Dict, Generator, List, Tuple
9+
from typing import Any, Dict, Generator, List, Optional, Tuple
1010

1111
from pip._internal.cli.status_codes import UNKNOWN_ERROR
1212
from pip._internal.configuration import Configuration, ConfigurationError
@@ -67,7 +67,7 @@ def format_usage(self, usage: str) -> str:
6767
msg = "\nUsage: {}\n".format(self.indent_lines(textwrap.dedent(usage), " "))
6868
return msg
6969

70-
def format_description(self, description: str) -> str:
70+
def format_description(self, description: Optional[str]) -> str:
7171
# leave full control over description to us
7272
if description:
7373
if hasattr(self.parser, "main"):
@@ -85,7 +85,7 @@ def format_description(self, description: str) -> str:
8585
else:
8686
return ""
8787

88-
def format_epilog(self, epilog: str) -> str:
88+
def format_epilog(self, epilog: Optional[str]) -> str:
8989
# leave full control over epilog to us
9090
if epilog:
9191
return epilog

tests/unit/test_req_uninstall.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,7 @@ def mock_permitted(ups: UninstallPathSet, path: str) -> bool:
2828
def test_uninstallation_paths() -> None:
2929
class dist:
3030
def iter_declared_entries(self) -> Optional[Iterator[str]]:
31-
yield "file.py"
32-
yield "file.pyc"
33-
yield "file.so"
34-
yield "nopyc.py"
31+
return iter(["file.py", "file.pyc", "file.so", "nopyc.py"])
3532

3633
location = ""
3734

tools/codespell-ignore.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ lousily
33
followings
44
# A contributor first name
55
wil
6+
Whit
67
# Codebase variable or class names
78
uptodate
89
afile

0 commit comments

Comments
 (0)