19
19
if t .TYPE_CHECKING :
20
20
import logging
21
21
22
- from singer_sdk .streams import Stream as RESTStreamBase
22
+ from singer_sdk .streams . rest import RESTStream
23
23
24
24
25
25
def _add_parameters (initial_url : str , extra_parameters : dict ) -> str :
@@ -83,7 +83,7 @@ def __call__(cls, *args: t.Any, **kwargs: t.Any) -> t.Any: # noqa: ANN401
83
83
class APIAuthenticatorBase :
84
84
"""Base class for offloading API auth."""
85
85
86
- def __init__ (self , stream : RESTStreamBase ) -> None :
86
+ def __init__ (self , stream : RESTStream ) -> None :
87
87
"""Init authenticator.
88
88
89
89
Args:
@@ -172,7 +172,7 @@ class SimpleAuthenticator(APIAuthenticatorBase):
172
172
173
173
def __init__ (
174
174
self ,
175
- stream : RESTStreamBase ,
175
+ stream : RESTStream ,
176
176
auth_headers : dict | None = None ,
177
177
) -> None :
178
178
"""Create a new authenticator.
@@ -202,7 +202,7 @@ class APIKeyAuthenticator(APIAuthenticatorBase):
202
202
203
203
def __init__ (
204
204
self ,
205
- stream : RESTStreamBase ,
205
+ stream : RESTStream ,
206
206
key : str ,
207
207
value : str ,
208
208
location : str = "header" ,
@@ -237,7 +237,7 @@ def __init__(
237
237
@classmethod
238
238
def create_for_stream (
239
239
cls : type [APIKeyAuthenticator ],
240
- stream : RESTStreamBase ,
240
+ stream : RESTStream ,
241
241
key : str ,
242
242
value : str ,
243
243
location : str ,
@@ -265,7 +265,7 @@ class BearerTokenAuthenticator(APIAuthenticatorBase):
265
265
'Bearer '. The token will be merged with HTTP headers on the stream.
266
266
"""
267
267
268
- def __init__ (self , stream : RESTStreamBase , token : str ) -> None :
268
+ def __init__ (self , stream : RESTStream , token : str ) -> None :
269
269
"""Create a new authenticator.
270
270
271
271
Args:
@@ -282,7 +282,7 @@ def __init__(self, stream: RESTStreamBase, token: str) -> None:
282
282
@classmethod
283
283
def create_for_stream (
284
284
cls : type [BearerTokenAuthenticator ],
285
- stream : RESTStreamBase ,
285
+ stream : RESTStream ,
286
286
token : str ,
287
287
) -> BearerTokenAuthenticator :
288
288
"""Create an Authenticator object specific to the Stream class.
@@ -308,7 +308,7 @@ class BasicAuthenticator(APIAuthenticatorBase):
308
308
309
309
def __init__ (
310
310
self ,
311
- stream : RESTStreamBase ,
311
+ stream : RESTStream ,
312
312
username : str ,
313
313
password : str ,
314
314
) -> None :
@@ -331,7 +331,7 @@ def __init__(
331
331
@classmethod
332
332
def create_for_stream (
333
333
cls : type [BasicAuthenticator ],
334
- stream : RESTStreamBase ,
334
+ stream : RESTStream ,
335
335
username : str ,
336
336
password : str ,
337
337
) -> BasicAuthenticator :
@@ -354,7 +354,7 @@ class OAuthAuthenticator(APIAuthenticatorBase):
354
354
355
355
def __init__ (
356
356
self ,
357
- stream : RESTStreamBase ,
357
+ stream : RESTStream ,
358
358
auth_endpoint : str | None = None ,
359
359
oauth_scopes : str | None = None ,
360
360
default_expiration : int | None = None ,
0 commit comments