Completed
Pull Request — master (#630)
by
unknown
56s
created

cookiecutter.StrictEnvironment.__init__()   A

Complexity

Conditions 1

Size

Total Lines 5

Duplication

Lines 0
Ratio 0 %
Metric Value
dl 0
loc 5
rs 9.4285
cc 1
1
# -*- coding: utf-8 -*-
2
3
from jinja2 import Environment, StrictUndefined
4
5
6
class StrictEnvironment(Environment):
7
    """Jinja2 environment that raises an error when it hits a variable
8
    which is not defined in the context used to render a template.
9
    """
10
    def __init__(self, **kwargs):
11
        super(StrictEnvironment, self).__init__(
12
            undefined=StrictUndefined,
13
            extensions=['jinja2_time.TimeExtension'],
14
            **kwargs
15
        )
16