MCPcopy
hub / github.com/KhronosGroup/Vulkan-Docs / enquote

Function enquote

scripts/generator.py:42–50  ·  view source on GitHub ↗

Return string argument with surrounding quotes, for serialization into Python code.

(s)

Source from the content-addressed store, hash-verified

40
41
42def enquote(s):
43 """Return string argument with surrounding quotes,
44 for serialization into Python code."""
45 if s:
46 if isinstance(s, str):
47 return f"'{s}'"
48 else:
49 return s
50 return None
51
52
53def genProtectDirective(protect_str):

Callers 10

writeDictMethod · 0.90
endFileMethod · 0.90
nilquoteFunction · 0.90
writeDictMethod · 0.90
endFileMethod · 0.90
undefquoteFunction · 0.90
writeDictMethod · 0.90
endFileMethod · 0.90
undefquoteFunction · 0.90
undefquoteFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected