Skip to content

Commit b88d4cb

Browse files
authored
Merge branch 'main' into patch-1
2 parents f46baae + 9fe1a92 commit b88d4cb

File tree

5 files changed

+16
-5
lines changed

5 files changed

+16
-5
lines changed

.pre-commit-config.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ exclude: 'src/pip/_vendor/'
22

33
repos:
44
- repo: https://github.com/pre-commit/pre-commit-hooks
5-
rev: v4.5.0
5+
rev: v4.6.0
66
hooks:
77
- id: check-builtin-literals
88
- id: check-added-large-files
@@ -22,13 +22,13 @@ repos:
2222
- id: black
2323

2424
- repo: https://github.com/astral-sh/ruff-pre-commit
25-
rev: v0.3.6
25+
rev: v0.4.1
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.8.0
31+
rev: v1.9.0
3232
hooks:
3333
- id: mypy
3434
exclude: tests/data

docs/html/reference/build-system/pyproject-toml.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,13 @@ dealing with [the same challenges as pip has for legacy builds](build-output).
130130

131131
## Fallback Behaviour
132132

133+
```{warning}
134+
The following snippet merely describes the fallback behavior. For valid
135+
examples of `pyproject.toml` to use with setuptools, please refer to
136+
[the setuptools documentation](
137+
https://setuptools.pypa.io/en/stable/userguide/quickstart.html#basic-use).
138+
```
139+
133140
If a project does not have a `pyproject.toml` file containing a `build-system`
134141
section, it will be assumed to have the following backend settings:
135142

news/12122.doc.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Add a warning explaining that the snippet in "Fallback behavior" is not a valid
2+
``pyproject.toml`` snippet for projects, and link to setuptools documentation
3+
instead.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Bump pre-commit hooks.

src/pip/_internal/metadata/_json.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
from email.header import Header, decode_header, make_header
44
from email.message import Message
5-
from typing import Any, Dict, List, Union
5+
from typing import Any, Dict, List, Union, cast
66

77
METADATA_FIELDS = [
88
# Name, Multiple-Use
@@ -77,7 +77,7 @@ def sanitise_header(h: Union[Header, str]) -> str:
7777
value = value.split()
7878
result[key] = value
7979

80-
payload = msg.get_payload()
80+
payload = cast(str, msg.get_payload())
8181
if payload:
8282
result["description"] = payload
8383

0 commit comments

Comments
 (0)