Skip to content

Commit 587b32b

Browse files
Varashiclaude
andcommitted
ci: fix ruff format + hadolint DL3021
ruff format controller.py (line-length wrapping); Dockerfile COPY multi-arg destination must end with / (DL3021). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent b5e3502 commit 587b32b

2 files changed

Lines changed: 8 additions & 6 deletions

File tree

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ WORKDIR /app
1111
RUN pip install --no-cache-dir --disable-pip-version-check \
1212
pyVmomi==8.0.3.0.1 kubernetes==31.0.0
1313

14-
COPY controller.py fence.py .
14+
COPY controller.py fence.py ./
1515

1616
# Default entrypoint = maintenance controller. The fence controller (fence.py)
1717
# is the same image with the command overridden to `python -u fence.py`.

controller.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -483,14 +483,14 @@ def uncordon(self, node_name):
483483

484484
def has_out_of_service_taint(self, node_name) -> bool:
485485
node = self.get_node(node_name)
486-
return any(
487-
t.key == OUT_OF_SERVICE_TAINT_KEY for t in (node.spec.taints or [])
488-
)
486+
return any(t.key == OUT_OF_SERVICE_TAINT_KEY for t in (node.spec.taints or []))
489487

490488
def _patch_taints(self, node_name, taints):
491489
# sanitize_for_serialization turns V1Taint objects into proper camelCase
492490
# API dicts (incl. timeAdded), so existing taints are preserved verbatim.
493-
body = {"spec": {"taints": self.core.api_client.sanitize_for_serialization(taints)}}
491+
body = {
492+
"spec": {"taints": self.core.api_client.sanitize_for_serialization(taints)}
493+
}
494494
self.core.patch_node(node_name, body)
495495

496496
def apply_out_of_service_taint(self, node_name):
@@ -518,7 +518,9 @@ def remove_out_of_service_taint(self, node_name):
518518
if not any(t.key == OUT_OF_SERVICE_TAINT_KEY for t in taints):
519519
return
520520
if DRY_RUN:
521-
log.info(f"[DRY RUN] Would un-fence {node_name} (remove out-of-service taint)")
521+
log.info(
522+
f"[DRY RUN] Would un-fence {node_name} (remove out-of-service taint)"
523+
)
522524
return
523525
log.info(f"Un-fencing {node_name}: removing {OUT_OF_SERVICE_TAINT_KEY} taint")
524526
kept = [t for t in taints if t.key != OUT_OF_SERVICE_TAINT_KEY]

0 commit comments

Comments
 (0)