MCPcopy Create free account
hub / github.com/numpy/numpy / HTMLTemplate

Class HTMLTemplate

tools/npy_tempita/__init__.py:483–502  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

481
482
483class HTMLTemplate(Template):
484
485 default_namespace = Template.default_namespace.copy()
486 default_namespace.update(dict(
487 html=html,
488 attr=attr,
489 url=url,
490 html_quote=html_quote))
491
492 def _repr(self, value, pos):
493 if hasattr(value, '__html__'):
494 value = value.__html__()
495 quote = False
496 else:
497 quote = True
498 plain = Template._repr(self, value, pos)
499 if quote:
500 return html_quote(plain)
501 else:
502 return plain
503
504
505def sub_html(content, **kw):

Callers 1

sub_htmlFunction · 0.85

Calls 2

updateMethod · 0.80
copyMethod · 0.45

Tested by

no test coverage detected