MCPcopy Index your code
hub / github.com/matplotlib/matplotlib / gen_embedded_lines

Function gen_embedded_lines

tools/embed_js.py:61–67  ·  view source on GitHub ↗
(pkg, source)

Source from the content-addressed store, hash-verified

59
60
61def gen_embedded_lines(pkg, source):
62 name = safe_name(pkg.name)
63 print('Embedding', source, 'as', name)
64 yield '// prettier-ignore\n'
65 for line in source.read_text().splitlines():
66 yield (line.replace('module.exports=function', f'var {name}=function')
67 + ' // eslint-disable-line\n')
68
69
70def build_mpljs(web_backend_path, license_path):

Callers 1

build_mpljsFunction · 0.85

Calls 1

safe_nameFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…