File tree Expand file tree Collapse file tree 2 files changed +4
-12
lines changed
Expand file tree Collapse file tree 2 files changed +4
-12
lines changed Original file line number Diff line number Diff line change 5454 fail-fast : false
5555 matrix :
5656 python-version :
57- - " 3.9"
5857 - " 3.10"
5958 - " 3.11"
6059 - " 3.12"
Original file line number Diff line number Diff line change 33from __future__ import annotations
44
55import typing as t
6- from pathlib import Path
7- from typing import Callable
86
9- import requests
107from singer_sdk .authenticators import BearerTokenAuthenticator
118from singer_sdk .pagination import BaseHATEOASPaginator , JSONPathPaginator
129from singer_sdk .streams import RESTStream
1310
11+ if t .TYPE_CHECKING :
12+ import requests
13+
1414T = t .TypeVar ("T" )
1515TPageToken = t .TypeVar ("TPageToken" )
1616
17- _Auth = Callable [[requests .PreparedRequest ], requests .PreparedRequest ]
18- SCHEMAS_DIR = Path (__file__ ).parent / Path ("./schemas" )
19-
2017
2118class IntercomStream (RESTStream ):
2219 """Intercom stream class."""
@@ -32,11 +29,7 @@ def url_base(self) -> str:
3229 @property
3330 def authenticator (self ) -> BearerTokenAuthenticator :
3431 """Return the authenticator."""
35- access_token = self .config .get ("access_token" )
36- if not access_token :
37- msg = "Access token is required"
38- raise ValueError (msg )
39- return BearerTokenAuthenticator .create_for_stream (self , token = access_token )
32+ return BearerTokenAuthenticator (token = self .config ["access_token" ])
4033
4134 @property
4235 def http_headers (self ) -> dict :
You can’t perform that action at this time.
0 commit comments