From dc9c873c73116e96bfd75b8140460ab44038e6c2 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Thu, 3 Aug 2023 22:17:32 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- samples/sample_tap_duckdb/tap_duckdb/tap.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/samples/sample_tap_duckdb/tap_duckdb/tap.py b/samples/sample_tap_duckdb/tap_duckdb/tap.py index 65092ccbe1..48217fdb4a 100644 --- a/samples/sample_tap_duckdb/tap_duckdb/tap.py +++ b/samples/sample_tap_duckdb/tap_duckdb/tap.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import typing as t from textwrap import dedent @@ -5,13 +7,14 @@ from singer_sdk import SQLConnector, SQLTap from singer_sdk import typing as th -from singer_sdk.helpers._batch import BaseBatchFileEncoding, BatchConfig from singer_sdk.streams import SQLStream +if t.TYPE_CHECKING: + from singer_sdk.helpers._batch import BatchConfig + class DuckDBBatchError(Exception): """DuckDB batch error.""" - pass class DuckDBConnector(SQLConnector): @@ -23,9 +26,7 @@ def get_sqlalchemy_url(self, config) -> str: class DuckDBStream(SQLStream): connector_class = DuckDBConnector - def get_batches(self, batch_config: BatchConfig, context = None): - root = batch_config.storage.root - prefix = batch_config.storage.prefix or "" + def get_batches(self, batch_config: BatchConfig, context=None): filepath = "out/out.ndjson" table_name = self.fully_qualified_name files = []