MCPcopy Index your code
hub / github.com/BrendanParmer/NodeToPython / enum_to_py_str

Function enum_to_py_str

NodeToPython/export/utils.py:36–46  ·  view source on GitHub ↗

Converts an enum into a string usuable in the add-on Parameters: enum (str): enum to be converted Returns: (str): converted string

(enum: str)

Source from the content-addressed store, hash-verified

34 return string
35
36def enum_to_py_str(enum: str) -> str:
37 """
38 Converts an enum into a string usuable in the add-on
39
40 Parameters:
41 enum (str): enum to be converted
42
43 Returns:
44 (str): converted string
45 """
46 return f"\'{enum}\'"
47
48def str_to_py_str(string: str) -> str:
49 """

Callers 15

_create_socketMethod · 0.85
_create_nodeMethod · 0.85
_color_ramp_settingsMethod · 0.85
_node_tree_settingsMethod · 0.85
_load_imageMethod · 0.85
_output_zone_itemsMethod · 0.85
_bake_itemsMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected