Skip to content

Commit 09c3613

Browse files
ref: Add python_multipart to the typing group (#6729)
Add `python_multipart` to the typing dependency group and fix the resulting mypy errors.
1 parent a3c64d0 commit 09c3613

3 files changed

Lines changed: 13 additions & 2 deletions

File tree

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ typing = [
6868
"botocore-stubs",
6969
"werkzeug",
7070
"starlette>=1.3.1",
71+
"python-multipart>=0.0.32",
7172
]
7273
test = [
7374
"dataclasses ; python_full_version < '3.7'",

sentry_sdk/integrations/starlette.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,12 +81,12 @@
8181
# Optional dependency of Starlette to parse form data.
8282
try:
8383
# python-multipart 0.0.13 and later
84-
import python_multipart as multipart # type: ignore
84+
import python_multipart as multipart
8585
except ImportError:
8686
# python-multipart 0.0.12 and earlier
8787
import multipart # type: ignore
8888
except ImportError:
89-
multipart = None
89+
multipart = None # type: ignore[assignment]
9090

9191

9292
# Vendored: https://github.com/Kludex/starlette/blob/0a29b5ccdcbd1285c75c4fdb5d62ae1d244a21b0/starlette/_utils.py#L11-L17

uv.lock

Lines changed: 10 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)