~tieong/notjinja2

3d2d3d09efe5365d34093b2b4a0d5e4ec0a667ca — Thomas Ieong 1 year, 7 months ago 7d2b699
Added types hints
1 files changed, 2 insertions(+), 2 deletions(-)

M notjinja2.py
M notjinja2.py => notjinja2.py +2 -2
@@ 16,7 16,7 @@ TOKENS = re.compile(r"(?s)({%.*?%}|{#.*?#}|{{.*?}})")
class Template:
    INDENT = 0

    def __init__(self, code, globs):
    def __init__(self, code, globs) -> None:
        self.code = ""
        self.globs = globs



@@ 122,7 122,7 @@ class Template:
    def dedent(self) -> None:
        self.INDENT -= 4

    def render(self):
    def render(self) -> str:
        exec(self.code)
        return eval("template_render")(self.globs)