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 @@ -6,7 +6,7 @@ repos:
hooks:
- id: trailing-whitespace
- repo: https://github.com/psf/black
rev: 22.3.0
rev: 25.1.0
hooks:
- id: black
- repo: https://github.com/PyCQA/flake8
Expand Down
2 changes: 2 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ Unreleased

* Log transient connection and timeout errors as warnings to reduce log noise.

* Upgraded ``black`` to ``25.1.0```.

2.46.0 (2025-03-17)
-------------------

Expand Down
6 changes: 3 additions & 3 deletions crate/operator/create.py
Original file line number Diff line number Diff line change
Expand Up @@ -516,9 +516,9 @@ def get_statefulset_crate_command(
elif config.CLOUD_PROVIDER == CloudProvider.GCP:
url = "http://169.254.169.254/computeMetadata/v1/instance/zone" # noqa
# projects/<account-id>/zones/us-central1-a
settings[
"-Cnode.attr.zone"
] = f"$(curl -s '{url}' -H 'Metadata-Flavor: Google' | awk -F'/' '{{print $NF}}')" # noqa
settings["-Cnode.attr.zone"] = (
f"$(curl -s '{url}' -H 'Metadata-Flavor: Google' | awk -F'/' '{{print $NF}}')" # noqa
)

if cluster_settings:
for k, v in cluster_settings.items():
Expand Down
4 changes: 1 addition & 3 deletions crate/operator/kube_auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,7 @@ async def login_via_kubernetes_asyncio(
scheme, token = (
(None, None)
if len(parts) == 0
else (None, parts[0])
if len(parts) == 1
else (parts[0], parts[1])
else (None, parts[0]) if len(parts) == 1 else (parts[0], parts[1])
) # RFC-7235, Appendix C.

# Interpret the k8s_config object for our own minimalistic credentials.
Expand Down
6 changes: 3 additions & 3 deletions crate/operator/restore_backup.py
Original file line number Diff line number Diff line change
Expand Up @@ -527,9 +527,9 @@ async def _prepare_cluster_settings(
)
)
patch.status["maxBytesPerSec"] = max_bytes_per_sec
patch.status[
"clusterConcurrentRebalance"
] = cluster_concurrent_rebalance
patch.status["clusterConcurrentRebalance"] = (
cluster_concurrent_rebalance
)
# update the settings during restore operation
await set_cluster_setting(
conn_factory,
Expand Down
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
[tool.black]
target-version = ['py38']
target-version = ['py313']
line-length = 88

[build-system]
requires = ["setuptools>=58", "wheel", "setuptools_scm>=6.2"]
Expand Down