From 4de267f489040a9f515a9c282bd4046321f7e148 Mon Sep 17 00:00:00 2001 From: Willi Date: Thu, 22 Aug 2024 17:15:10 +0530 Subject: [PATCH] updates signature of Paginator.update_state() --- tests/sources/rest_api/integration/test_offline.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/sources/rest_api/integration/test_offline.py b/tests/sources/rest_api/integration/test_offline.py index 8a0b07d745..2c1f48537b 100644 --- a/tests/sources/rest_api/integration/test_offline.py +++ b/tests/sources/rest_api/integration/test_offline.py @@ -1,6 +1,8 @@ +from typing import Any, List, Optional from unittest import mock import pytest +from requests import Request, Response import dlt from dlt.common import pendulum @@ -140,10 +142,10 @@ def test_ignoring_endpoint_returning_404(mock_api_server): def test_source_with_post_request(mock_api_server): class JSONBodyPageCursorPaginator(BaseReferencePaginator): - def update_state(self, response): + def update_state(self, response: Response, data: Optional[List[Any]] = None) -> None: self._next_reference = response.json().get("next_page") - def update_request(self, request): + def update_request(self, request: Request) -> None: if request.json is None: request.json = {}