Skip to content
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 @@ -7,7 +7,7 @@ repos:
hooks:
- id: trailing-whitespace
- repo: https://github.com/psf/black
rev: "24.8.0"
rev: "26.5.1"
hooks:
- id: black
- repo: https://github.com/PyCQA/flake8
Expand Down
4 changes: 2 additions & 2 deletions croud/clusters/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -1104,13 +1104,13 @@ def _wait_for_completed_operation(

# Call for custom feedback if function available and there is status to report.
if status in ["IN_PROGRESS", "SUCCEEDED"] and feedback_func:
(feedback_f, feedback_args) = feedback_func
feedback_f, feedback_args = feedback_func
feedback_f(status, feedback, *feedback_args)

# Final statuses
if status == "SUCCEEDED":
if post_success_func:
(func, call_args) = post_success_func
func, call_args = post_success_func
func(*call_args)
print_success("Operation completed.")
break
Expand Down
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from crate.theme.rtd.conf.cloud_cli import * # noqa

extensions.append("sphinxarg.ext") # type:ignore # noqa:F405
extensions.append("sphinxarg.ext") # type: ignore # noqa:F405

html_static_path = ["_static"]
html_context = {"extra_css_files": ["_static/sphinxarg.css"]}
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
"tox<4",
],
"development": [
"black<26",
"black<27",
"flake8<7.3",
"isort<6",
"mypy<2.4",
Expand Down
6 changes: 2 additions & 4 deletions tests/commands/test_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,7 @@ def test_config_show(config, capsys):
def test_invalid_config(capsys, tmp_path):
with open(tmp_path / "invalid.yaml", "w") as fp:
# Write a legacy format config
fp.write(
"""\
fp.write("""\
auth:
contexts:
dev:
Expand All @@ -159,8 +158,7 @@ def test_invalid_config(capsys, tmp_path):
current_context: prod
output_fmt: table
region: bregenz.a1
"""
)
""")

invalid_config = Configuration("invalid.yaml", tmp_path)

Expand Down
12 changes: 4 additions & 8 deletions tests/test_configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,12 +113,10 @@ def test_load_invalid_configuration(tmp_path):
"croud.config.configuration.user_config_dir", return_value=str(tmp_path)
):
with open(tmp_path / "test.yaml", "w") as fp:
fp.write(
"""\
fp.write("""\
current-profile: foo
default-format: table
"""
)
""")
config = Configuration("test.yaml")
with pytest.raises(InvalidConfiguration, match="is not a valid configuration"):
_ = config.config
Expand All @@ -129,8 +127,7 @@ def test_load_with_api_keys(tmp_path):
"croud.config.configuration.user_config_dir", return_value=str(tmp_path)
):
with open(tmp_path / "test.yaml", "w") as fp:
fp.write(
"""
fp.write("""
default-format: table
current-profile: cratedb.cloud
profiles:
Expand All @@ -140,8 +137,7 @@ def test_load_with_api_keys(tmp_path):
secret: my-secret
endpoint: https://console.cratedb.cloud
region: _any_
"""
)
""")
config = Configuration("test.yaml")
assert config.key == "my-key"
assert config.secret == "my-secret"
Expand Down
Loading