diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 71c5e264..d4476de6 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -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 diff --git a/croud/clusters/commands.py b/croud/clusters/commands.py index 0b72f8ef..b1d0102a 100644 --- a/croud/clusters/commands.py +++ b/croud/clusters/commands.py @@ -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 diff --git a/docs/conf.py b/docs/conf.py index 1c4e0619..b159dd87 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -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"]} diff --git a/setup.py b/setup.py index d21b2b22..8a306e1c 100644 --- a/setup.py +++ b/setup.py @@ -69,7 +69,7 @@ "tox<4", ], "development": [ - "black<26", + "black<27", "flake8<7.3", "isort<6", "mypy<2.4", diff --git a/tests/commands/test_config.py b/tests/commands/test_config.py index e4a10a5e..0b803ab0 100644 --- a/tests/commands/test_config.py +++ b/tests/commands/test_config.py @@ -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: @@ -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) diff --git a/tests/test_configuration.py b/tests/test_configuration.py index abcb222f..bbb23610 100644 --- a/tests/test_configuration.py +++ b/tests/test_configuration.py @@ -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 @@ -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: @@ -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"