Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: pre-commit autoupdate #240

Merged
merged 3 commits into from
Aug 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ repos:
- id: check-github-workflows

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.5.6
rev: v0.6.1
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
Expand Down
4 changes: 2 additions & 2 deletions target_snowflake/connector.py
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,7 @@ def _get_merge_from_stage_statement( # noqa: ANN202
dedup = f"QUALIFY ROW_NUMBER() OVER (PARTITION BY {dedup_cols} ORDER BY SEQ8() DESC) = 1"
return (
text(
f"merge into {full_table_name} d using " # noqa: ISC003
f"merge into {full_table_name} d using " # noqa: ISC003, S608
+ f"(select {json_casting_selects} from '@~/target-snowflake/{sync_id}'" # noqa: S608
+ f"(file_format => {file_format}) {dedup}) s "
+ f"on {join_expr} "
Expand All @@ -431,7 +431,7 @@ def _get_copy_statement(self, full_table_name, schema, sync_id, file_format): #
)
return (
text(
f"copy into {full_table_name} {col_alias_selects} from " # noqa: ISC003
f"copy into {full_table_name} {col_alias_selects} from " # noqa: ISC003, S608
+ f"(select {json_casting_selects} from " # noqa: S608
+ f"'@~/target-snowflake/{sync_id}')"
+ f"file_format = (format_name='{file_format}')",
Expand Down
6 changes: 3 additions & 3 deletions tests/test_target_snowflake.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,14 @@
class BaseSnowflakeTargetTests:
"""Base class for Snowflake target tests."""

@pytest.fixture()
@pytest.fixture
def connection(self, runner):
return runner.singer_class.default_sink_class.connector_class(
runner.config,
).connection

@pytest.fixture()
def resource(self, runner, connection): # noqa: PT004
@pytest.fixture
def resource(self, runner, connection):
"""Generic external resource.

This fixture is useful for setup and teardown of external resources,
Expand Down