Skip to content

Commit

Permalink
chore: run pre-commit
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-twhite committed Mar 22, 2024
1 parent 9a4cb57 commit 6b124e9
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 13 deletions.
4 changes: 2 additions & 2 deletions performance_history_analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def _print_summary_performance_descending(
) -> None:
commits_with_diffs: List[Tuple[Commit, Decimal]] = []
last_result: Optional[Decimal] = None
for (commit, result) in reversed(commits_with_results):
for commit, result in reversed(commits_with_results):
if last_result:
result_diff = Decimal(result) - last_result
if result_diff > 0:
Expand All @@ -54,7 +54,7 @@ def _print_summary_performance_descending(
commits_with_diffs, key=lambda e: e[1], reverse=True
)
print("\nCommits causing performance descending:")
for (commit, diff) in sorted_list_of_diffs:
for commit, diff in sorted_list_of_diffs:
print(
f"Diff [{diff}] after commit {commit} ({commit.authored_datetime}) -> {commit.message.splitlines()[0]}"
)
Expand Down
8 changes: 5 additions & 3 deletions src/snowflake/cli/api/commands/project_initialisation.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,11 @@ def add_init_command(
def init(
project_name: str = Argument(
f"example_{project_type.lower()}",
help=help_message
if help_message is not None
else f"Name of the {project_type} project you want to create.",
help=(
help_message
if help_message is not None
else f"Name of the {project_type} project you want to create."
),
),
**options,
) -> CommandResult:
Expand Down
4 changes: 3 additions & 1 deletion src/snowflake/cli/plugins/object/stage/diff.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,9 @@ def __str__(self) -> str:
"""
Method override for the standard behavior of string representation for this class.
"""
components: List[str] = (
components: List[
str
] = (
[]
) # py3.8 does not support subscriptions for builtin list, hence using List

Expand Down
2 changes: 1 addition & 1 deletion src/snowflake/cli/plugins/sql/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def execute_sql(
"-i",
help="Read the query from standard input. Use it when piping input to this command.",
),
**options
**options,
) -> CommandResult:
"""
Executes Snowflake query.
Expand Down
8 changes: 5 additions & 3 deletions tests/test_logs.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,11 @@ def _setup_config_and_logs(
"",
"[cli.logs]",
f'path = "{logs_path}"' if use_custom_logs_path else None,
f"save_logs = {str(save_logs).lower()}"
if save_logs is not None
else None,
(
f"save_logs = {str(save_logs).lower()}"
if save_logs is not None
else None
),
f'level = "{level}"' if level else None,
]
if x is not None
Expand Down
1 change: 1 addition & 0 deletions tests/test_main.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""These tests verify that the CLI runs work as expected."""

from __future__ import annotations

import json
Expand Down
8 changes: 5 additions & 3 deletions tests_integration/testing_utils/snowpark_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,11 @@ def snowpark_execute_should_return_expected_value(
assert_that_result_contains_row_with(
result,
{
identifier.upper()
if object_type == TestType.FUNCTION.value
else entity_name.upper(): expected_value
(
identifier.upper()
if object_type == TestType.FUNCTION.value
else entity_name.upper()
): expected_value
},
)

Expand Down

0 comments on commit 6b124e9

Please sign in to comment.