Skip to content

Commit 5a6a712

Browse files
committed
Correct type annotations
The type of the `data` parameter of `urllib.request.Request` is bytes. Previously the type annotations for the method parameters used to pass the data passed via this parameter were the incorrect type `str`.
1 parent df1bb53 commit 5a6a712

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

reportsizedeltas/reportsizedeltas.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -581,7 +581,7 @@ def get_json_response(self, url: str):
581581
except Exception as exception:
582582
raise exception
583583

584-
def http_request(self, url: str, data: str | None = None):
584+
def http_request(self, url: str, data: bytes | None = None):
585585
"""Make a request and return a dictionary:
586586
read -- the response
587587
info -- headers
@@ -599,7 +599,7 @@ def http_request(self, url: str, data: str | None = None):
599599
"url": response_object.geturl(),
600600
}
601601

602-
def raw_http_request(self, url: str, data: str | None = None):
602+
def raw_http_request(self, url: str, data: bytes | None = None):
603603
"""Make a request and return an object containing the response.
604604
605605
Keyword arguments:

0 commit comments

Comments
 (0)