Anki/anki/template/__init__.py
Damien Elmes 6ecfff56c5 add pytype inferred types to anki/
I've corrected some obvious issues, and we can fix others over time.
Mypy tests are currently broken, as adding the type hints has increased
mypy's testing surface.
2019-12-20 11:07:08 +10:00

9 lines
308 B
Python

from .template import Template
from . import furigana; furigana.install()
from . import hint; hint.install()
from typing import Any
def render(template, context=None, **kwargs) -> Any:
context = context and context.copy() or {}
context.update(kwargs)
return Template(template, context).render()