Skip to content

Commit

Permalink
[pre-commit.ci] pre-commit autoupdate (#1305)
Browse files Browse the repository at this point in the history
* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/Lucas-C/pre-commit-hooks: v1.5.3 → v1.5.4](Lucas-C/pre-commit-hooks@v1.5.3...v1.5.4)
- [github.com/astral-sh/ruff-pre-commit: v0.0.282 → v0.0.284](astral-sh/ruff-pre-commit@v0.0.282...v0.0.284)

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
pre-commit-ci[bot] authored Aug 15, 2023
1 parent e2380a4 commit 08a68cb
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 12 deletions.
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ repos:
- id: python-check-blanket-type-ignore

- repo: https://github.com/Lucas-C/pre-commit-hooks
rev: v1.5.3
rev: v1.5.4
hooks:
- id: forbid-crlf
- id: remove-crlf
Expand All @@ -55,7 +55,7 @@ repos:
additional_dependencies: [black==22.3.0]

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: 'v0.0.282'
rev: 'v0.0.284'
hooks:
- id: ruff
args: ["--config", "./pyproject.toml"]
Expand Down
11 changes: 3 additions & 8 deletions astronomer/providers/google/cloud/hooks/bigquery.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,14 +106,9 @@ def value_check(
tolerance_pct_str = str(tolerance * 100) + "%" if tolerance else None

error_msg = (
"Test failed.\nPass value:{pass_value_conv}\n"
"Tolerance:{tolerance_pct_str}\n"
"Query:\n{sql}\nResults:\n{records!s}"
).format(
pass_value_conv=pass_value_conv,
tolerance_pct_str=tolerance_pct_str,
sql=sql,
records=records,
f"Test failed.\nPass value:{pass_value_conv}\n"
f"Tolerance:{tolerance_pct_str}\n"
f"Query:\n{sql}\nResults:\n{records!s}"
)

if not is_numeric_value_check:
Expand Down
4 changes: 2 additions & 2 deletions astronomer/providers/snowflake/extractors/snowflake.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ def extract(self) -> TaskMetadata:
)
elif len(query_ids) > 1:
warnings_msg = (
"Found more than one query id for task {0}: {1} This might indicate that this task "
"might be better as multiple jobs".format(task_name, query_ids)
f"Found more than one query id for task {task_name}: {query_ids} This might indicate that this task "
"might be better as multiple jobs"
)
self.log.warning(warnings_msg)

Expand Down

0 comments on commit 08a68cb

Please sign in to comment.