Skip to content
Prev Previous commit
Next Next commit
Clarified dump_enum docstring in generate_sre_constants.py
  • Loading branch information
terryluan12 committed Jan 5, 2026
commit 1c5eb437c7e3694a299e4a08ed21167d2699f5a2
3 changes: 2 additions & 1 deletion scripts/generate_sre_constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def dump_enum(d, enum_name, derives, strip_prefix=""):
"""Generate Rust enum definitions from a Python dictionary.

Args:
d (dict): The dictionary containing the enum variants.
d (list): The list containing the enum variants.
enum_name (str): The name of the enum to generate.
derives (str): The derive attributes to include.
strip_prefix (str, optional): A prefix to strip from the variant names. Defaults to "".
Expand All @@ -44,6 +44,7 @@ def dump_enum(d, enum_name, derives, strip_prefix=""):
list: A list of strings representing the enum definition.
"""
items = sorted(d)
print(f"items is {items}")
content = [f"{derives}\n"]
content.append("#[repr(u32)]\n")
content.append("#[allow(non_camel_case_types, clippy::upper_case_acronyms)]\n")
Expand Down