Skip to content

Commit

Permalink
Type for response text and _data
Browse files Browse the repository at this point in the history
  • Loading branch information
davetapley committed Jan 29, 2024
1 parent a6e20a8 commit abc4cc2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion falcon/response.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,9 @@ class Response:
# Child classes may override this
context_type = structures.Context

text: Optional[str]
_data: Optional[bytes]

def __init__(self, options=None):
self.status = '200 OK'
self._headers = {}
Expand Down Expand Up @@ -227,7 +230,7 @@ def data(self):
return self._data

@data.setter
def data(self, value):
def data(self, value: bytes):
self._data = value

@property
Expand Down

0 comments on commit abc4cc2

Please sign in to comment.