fix lint errors from merge: duplicate def, shadowed import, empty f-string

- deployment_create.py: remove duplicate create_registry_secret signature
- deploy_k8s.py: rename loop var 'config' to 'svc_config' (shadowed import)
- deploy_k8s.py: remove f-prefix from string without placeholders
- deploy_k8s.py: suppress pre-existing C901 on _create_volume_data

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
pull/740/head
A. F. Dudley 2026-04-01 19:17:45 +00:00
parent 549ac8c01d
commit 5bf96112d3
2 changed files with 7 additions and 8 deletions

View File

@ -583,7 +583,6 @@ def _generate_and_store_secrets(
def create_registry_secret(
spec: Spec, deployment_name: str, namespace: str = "default"
) -> Optional[str]:
def create_registry_secret(spec: Spec, deployment_name: str, namespace: str = "default") -> Optional[str]:
"""Create K8s docker-registry secret from spec + environment.
Reads registry configuration from spec.yml and creates a Kubernetes

View File

@ -339,7 +339,7 @@ class K8sDeployer(Deployer):
except ApiException as e:
_check_delete_exception(e)
def _create_volume_data(self):
def _create_volume_data(self): # noqa: C901
# Create the host-path-mounted PVs for this deployment
pvs = self.cluster_info.get_pvs()
for pv in pvs:
@ -460,15 +460,15 @@ class K8sDeployer(Deployer):
raise
# Create Endpoints for selector-mode services
for name, config in ext_services.items():
if "selector" not in config or "namespace" not in config:
for name, svc_config in ext_services.items():
if "selector" not in svc_config or "namespace" not in svc_config:
continue
if opts.o.dry_run:
continue
target_ns = config["namespace"]
selector = config["selector"]
port = config.get("port", 443)
target_ns = svc_config["namespace"]
selector = svc_config["selector"]
port = svc_config.get("port", 443)
# Build label selector string from dict
label_selector = ",".join(f"{k}={v}" for k, v in selector.items())
@ -535,7 +535,7 @@ class K8sDeployer(Deployer):
if not ca_secret:
return
if opts.o.dry_run:
print(f"Dry run: would create CA certificate secret")
print("Dry run: would create CA certificate secret")
return
secret_name = ca_secret.metadata.name