From 94316baccea9ff7f596c82f91e5d66f6599cc93e Mon Sep 17 00:00:00 2001 From: Josh lloyd Date: Tue, 3 Sep 2024 13:06:41 -0600 Subject: [PATCH] fixed linting issues --- tap_rest_api_msdk/streams.py | 7 ++++++- tests/test_core.py | 6 ++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/tap_rest_api_msdk/streams.py b/tap_rest_api_msdk/streams.py index 191ff1e..3f44a47 100644 --- a/tap_rest_api_msdk/streams.py +++ b/tap_rest_api_msdk/streams.py @@ -8,6 +8,7 @@ from urllib.parse import parse_qs, parse_qsl, urlparse import requests +from singer_sdk.helpers import types from singer_sdk.helpers.jsonpath import extract_jsonpath from singer_sdk.pagination import ( BaseHATEOASPaginator, @@ -579,7 +580,11 @@ def parse_response(self, response: requests.Response) -> Iterable[dict]: """ yield from extract_jsonpath(self.records_path, input=response.json()) - def post_process(self, row: dict, context: Optional[dict] = None) -> dict: + def post_process( # noqa: PLR6301 + self, + row: types.Record, + context: Optional[types.Context] = None, # noqa: ARG002 + ) -> Optional[dict]: """As needed, append or transform raw data to match expected structure. Args: diff --git a/tests/test_core.py b/tests/test_core.py index 2e5108c..cc318dc 100644 --- a/tests/test_core.py +++ b/tests/test_core.py @@ -1,6 +1,6 @@ """Tests standard tap features using the built-in SDK tests library.""" -from singer_sdk.testing import get_standard_tap_tests +from singer_sdk.testing import get_tap_test_class from tap_rest_api_msdk.tap import TapRestApiMsdk from tests.test_streams import config, json_resp, url_path @@ -10,6 +10,4 @@ def test_standard_tap_tests(requests_mock): """Run standard tap tests from the SDK.""" requests_mock.get(url_path(), json=json_resp()) - tests = get_standard_tap_tests(TapRestApiMsdk, config=config()) - for test in tests: - test() + get_tap_test_class(TapRestApiMsdk, config=config())