Rename all instances of Cpython to CPython (#3702)

This commit is contained in:
Zanie Blue 2024-05-21 15:52:31 -04:00 committed by GitHub
parent d313d9b1fa
commit 19df1a4372
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 475 additions and 466 deletions

View file

@ -33,10 +33,19 @@ except ImportError:
exit(1)
def prepare_name(name: str) -> str:
match name:
case "cpython":
return "CPython"
case _:
raise ValueError(f"Unknown implementation name: {name}")
def prepare_value(value: dict) -> dict:
# Convert fields from snake case to camel case for enums
for key in ["arch", "os", "libc", "name"]:
for key in ["arch", "os", "libc"]:
value[key] = value[key].title()
value["name"] = prepare_name(value["name"])
return value