Skip to content

Commit

Permalink
Remove deprecated kwargs
Browse files Browse the repository at this point in the history
  • Loading branch information
burnash committed May 7, 2024
1 parent ad48c0c commit 5dfb678
Showing 1 changed file with 0 additions and 21 deletions.
21 changes: 0 additions & 21 deletions dlt/sources/helpers/rest_client/paginators.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
from abc import ABC, abstractmethod
from typing import Optional, Dict, Any
from urllib.parse import urlparse, urljoin
import warnings

from requests import Response, Request
from dlt.common import jsonpath
Expand Down Expand Up @@ -302,8 +301,6 @@ def __init__(
limit_param: str = "limit",
total_path: jsonpath.TJsonPath = "total",
maximum_offset: Optional[int] = None,
initial_limit: Optional[int] = None,
initial_offset: Optional[int] = None,
) -> None:
"""
Args:
Expand All @@ -321,25 +318,7 @@ def __init__(
pagination will stop once this offset is reached or exceeded,
even if more data is available. This allows you to limit the
maximum range for pagination. Defaults to None.
initial_limit (int, optional): Deprecated, use `limit` instead.
initial_offset (int, optional): Deprecated, use `offset` instead.
"""
if initial_limit is not None:
warnings.warn(
"The 'initial_limit' argument is deprecated and will be removed in future versions."
" Use 'limit' instead.",
DeprecationWarning,
)
limit = initial_limit

if initial_offset is not None:
warnings.warn(
"The 'initial_offset' argument is deprecated and will be removed in future"
" versions. Use 'offset' instead.",
DeprecationWarning,
)
offset = initial_offset

super().__init__(
param_name=offset_param,
initial_value=offset,
Expand Down

0 comments on commit 5dfb678

Please sign in to comment.