Skip to content

Commit

Permalink
chore: pre-commit autoupdate (#240)
Browse files Browse the repository at this point in the history
<!--pre-commit.ci start-->
updates:
- [github.com/astral-sh/ruff-pre-commit: v0.5.6 →
v0.6.1](astral-sh/ruff-pre-commit@v0.5.6...v0.6.1)
<!--pre-commit.ci end-->

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Edgar Ramírez Mondragón <[email protected]>
  • Loading branch information
pre-commit-ci[bot] and edgarrmondragon authored Aug 19, 2024
1 parent c66ce2b commit dfc8b95
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
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

0 comments on commit dfc8b95

Please sign in to comment.