Skip to content

Commit 562440e

Browse files
ericfitzclaude
andcommitted
fix(scripts): add type narrowing asserts for ty checker
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 8c6deac commit 562440e

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

scripts/setup-oci-public.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -787,6 +787,7 @@ def certs(ctx):
787787
)
788788
click.echo(" and re-run 'make deploy-oci'.", err=True)
789789
sys.exit(1)
790+
assert fn_id is not None # narrowing for type checkers (checked above)
790791
click.echo(f" Found certmgr function: {fn_id}")
791792

792793
click.echo(f" Invoking certmgr for *.{cfg.domain}...")
@@ -826,6 +827,7 @@ def certs(ctx):
826827
click.echo("ERROR: Could not retrieve certificate or key from Vault.", err=True)
827828
click.echo(" Check certmgr function logs and Vault IAM policies.", err=True)
828829
sys.exit(1)
830+
assert cert_pem is not None and key_pem is not None # narrowing (checked above)
829831
click.echo(" [OK] Retrieved certificate and private key from Vault")
830832

831833
click.echo(" Creating K8s TLS secret...")

0 commit comments

Comments
 (0)