From 8d62f506ee0f2a62459964e703a9e53b6a3ae6e3 Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Wed, 11 Jun 2025 15:30:15 -0400 Subject: [PATCH] makejson: Use `.startswith`, not `is` More specifically, the use of `is` here appears to be a bug, since that operator tests for operator identity. The correct operator to use is `==`, but in this context using `.startswith()` better expresses what we're actually checking. --- scripts/makejson | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/makejson b/scripts/makejson index 4334b623..aa843b83 100755 --- a/scripts/makejson +++ b/scripts/makejson @@ -34,7 +34,7 @@ json_file = os.getenv("JSON") if version is None: sys.stderr.write("Version is not specified for release\n") sys.exit(1) -if version[0] is "v": +if version.startswith("v"): # Strip the leading "v" from versioning version = version[1:]