Skip to content

Commit

Permalink
Merge pull request #12740 from ichard26/bump-pre-commit
Browse files Browse the repository at this point in the history
  • Loading branch information
uranusjr authored Jun 3, 2024
2 parents 911bf99 + deededf commit 86b8b23
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 11 deletions.
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,18 @@ repos:
exclude: .patch

- repo: https://github.com/psf/black-pre-commit-mirror
rev: 24.4.0
rev: 24.4.2
hooks:
- id: black

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

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

- repo: https://github.com/codespell-project/codespell
rev: v2.2.6
rev: v2.3.0
hooks:
- id: codespell
exclude: AUTHORS.txt|tests/data
Expand Down
6 changes: 3 additions & 3 deletions src/pip/_internal/cli/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import sys
import textwrap
from contextlib import suppress
from typing import Any, Dict, Generator, List, Tuple
from typing import Any, Dict, Generator, List, Optional, Tuple

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

def format_description(self, description: str) -> str:
def format_description(self, description: Optional[str]) -> str:
# leave full control over description to us
if description:
if hasattr(self.parser, "main"):
Expand All @@ -85,7 +85,7 @@ def format_description(self, description: str) -> str:
else:
return ""

def format_epilog(self, epilog: str) -> str:
def format_epilog(self, epilog: Optional[str]) -> str:
# leave full control over epilog to us
if epilog:
return epilog
Expand Down
5 changes: 1 addition & 4 deletions tests/unit/test_req_uninstall.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,7 @@ def mock_permitted(ups: UninstallPathSet, path: str) -> bool:
def test_uninstallation_paths() -> None:
class dist:
def iter_declared_entries(self) -> Optional[Iterator[str]]:
yield "file.py"
yield "file.pyc"
yield "file.so"
yield "nopyc.py"
return iter(["file.py", "file.pyc", "file.so", "nopyc.py"])

location = ""

Expand Down
1 change: 1 addition & 0 deletions tools/codespell-ignore.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ lousily
followings
# A contributor first name
wil
Whit
# Codebase variable or class names
uptodate
afile
Expand Down

0 comments on commit 86b8b23

Please sign in to comment.