Skip to content

Commit

Permalink
twisted#11902 - Fix type for twisted.web.server.Request.defaultConten…
Browse files Browse the repository at this point in the history
…tType (twisted#12101)
  • Loading branch information
adiroiban committed Feb 1, 2024
2 parents 40ca8d0 + 70c1b19 commit 234f378
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/twisted/newsfragments/11902.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Change typing for twisted.web.server.Request.defaultContentType to allow None.
3 changes: 1 addition & 2 deletions src/twisted/web/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,7 @@ class Request(Copyable, http.Request, components.Componentized):
will be transmitted only over HTTPS.
"""

defaultContentType = b"text/html"

defaultContentType: Optional[bytes] = b"text/html"
site = None
appRootURL = None
prepath: Optional[List[bytes]] = None
Expand Down

0 comments on commit 234f378

Please sign in to comment.