Skip to content

Commit 822853e

Browse files
fix stubs of HttpRequest read / readine (#37)
* fix stubs of HttpRequest read / readine these both accept None which consumes the whole stream * lockfile hax --------- Co-authored-by: Anthony Sottile <[email protected]>
1 parent 4dc5d9a commit 822853e

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

django-stubs/http/request.pyi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,8 @@ class HttpRequest:
105105
def accepts(self, media_type: str) -> bool: ...
106106
def close(self) -> None: ...
107107
# File-like and iterator interface, a minimal subset of BytesIO.
108-
def read(self, n: int = -1, /) -> bytes: ...
109-
def readline(self, limit: int = -1, /) -> bytes: ...
108+
def read(self, n: int | None = -1, /) -> bytes: ...
109+
def readline(self, limit: int | None = -1, /) -> bytes: ...
110110
def __iter__(self) -> Iterator[bytes]: ...
111111
def readlines(self) -> list[bytes]: ...
112112

uv.lock

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

0 commit comments

Comments
 (0)