MCPcopy Index your code
hub / github.com/plotly/plotly.py / _safe

Function _safe

plotly/io/_json.py:71–76  ·  view source on GitHub ↗
(json_str, _swap)

Source from the content-addressed store, hash-verified

69
70
71def _safe(json_str, _swap):
72 out = json_str
73 for unsafe_char, safe_char in _swap:
74 if unsafe_char in out:
75 out = out.replace(unsafe_char, safe_char)
76 return out
77
78
79def to_json_plotly(plotly_object, pretty=False, engine=None):

Callers 1

to_json_plotlyFunction · 0.85

Calls 1

replaceMethod · 0.45

Tested by

no test coverage detected