MCPcopy Create free account
hub / github.com/Enfoirer/Text2GraphRAG / enclose_string_with_quotes

Function enclose_string_with_quotes

nano_graphrag/_utils.py:232–238  ·  view source on GitHub ↗

Enclose a string with quotes

(content: Any)

Source from the content-addressed store, hash-verified

230
231
232def enclose_string_with_quotes(content: Any) -> str:
233 """Enclose a string with quotes"""
234 if isinstance(content, numbers.Number):
235 return str(content)
236 content = str(content)
237 content = content.strip().strip("'").strip('"')
238 return f'"{content}"'
239
240
241def list_of_list_to_csv(data: list[list]):

Callers 1

list_of_list_to_csvFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected