Skip to content

Commit c0e67e9

Browse files
authored
Request.json property is only Any (#3070)
2 parents fb4f9f5 + 8ac21db commit c0e67e9

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

CHANGES.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ Unreleased
99
- The multipart form parser handles a ``\r\n`` sequence at a chunk boundary.
1010
:issue:`3065`
1111
- Improve CPU usage during Watchdog reloader. :issue:`3054`
12+
- `Request.json` annotation is more accurate. :issue:`3067`
1213

1314

1415
Version 3.1.3

src/werkzeug/wrappers/request.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -542,7 +542,7 @@ def url_root(self) -> str:
542542
json_module = json
543543

544544
@property
545-
def json(self) -> t.Any | None:
545+
def json(self) -> t.Any:
546546
"""The parsed JSON data if :attr:`mimetype` indicates JSON
547547
(:mimetype:`application/json`, see :attr:`is_json`).
548548

0 commit comments

Comments
 (0)