From 5aa178a76ed113aedca3470739e162c3cdb2fe56 Mon Sep 17 00:00:00 2001 From: Karim shoair Date: Tue, 20 Jan 2026 18:27:52 +0200 Subject: [PATCH] style: update post requests type hints to be more accurate --- scrapling/engines/_browsers/_types.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scrapling/engines/_browsers/_types.py b/scrapling/engines/_browsers/_types.py index 8391e9c..47322da 100644 --- a/scrapling/engines/_browsers/_types.py +++ b/scrapling/engines/_browsers/_types.py @@ -1,3 +1,5 @@ +from io import BytesIO + from curl_cffi.requests import ( ProxySpec, CookieTypes, @@ -50,7 +52,7 @@ if TYPE_CHECKING: # pragma: no cover # Types for POST/PUT/DELETE request method parameters class DataRequestParams(GetRequestParams, total=False): - data: Optional[Dict | str] + data: Optional[Dict[str, str] | List[Tuple] | str | BytesIO | bytes] json: Optional[Dict | List] # Types for browser session