Skip to content

Commit ae647de

Browse files
committed
fix: type capture v1 send timeouts as float
1 parent 0d699a8 commit ae647de

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

‎posthog/capture_send.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ def _post_v1(
279279
attempt: int,
280280
request_id: str,
281281
compression: CaptureCompression = CaptureCompression.NONE,
282-
timeout: int = 15,
282+
timeout: float = 15,
283283
sdk_info: str = USER_AGENT,
284284
session: Optional["requests.Session"] = None,
285285
path: str = _CAPTURE_V1_PATH,
@@ -401,7 +401,7 @@ def _send_v1_batch(
401401
batch: list[dict],
402402
*,
403403
compression: CaptureCompression = CaptureCompression.NONE,
404-
timeout: int = 15,
404+
timeout: float = 15,
405405
max_retries: int = 3,
406406
historical_migration: bool = False,
407407
sdk_info: str = USER_AGENT,

‎sdk_compliance_adapter/adapter.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ def patched_post_v1(
172172
attempt: int,
173173
request_id: str,
174174
compression: CaptureCompression = CaptureCompression.NONE,
175-
timeout: int = 15,
175+
timeout: float = 15,
176176
sdk_info: str = USER_AGENT,
177177
session: Any = None,
178178
path: str = _CAPTURE_V1_PATH,

‎typings/requests/__init__.pyi‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ class Session:
3434
*,
3535
data: str | bytes,
3636
headers: dict[str, str],
37-
timeout: int,
37+
timeout: float,
3838
stream: bool = ...,
3939
) -> Response: ...
4040
def get(

0 commit comments

Comments
 (0)