We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3a789e2 commit 3f147faCopy full SHA for 3f147fa
4 files changed
json_explorer/codegen/core/templates.py
@@ -9,11 +9,8 @@
9
from pathlib import Path
10
from typing import Any
11
12
-try:
13
- import jinja2
14
- from jinja2 import Environment
15
-except ImportError:
16
- jinja2 = None
+import jinja2
+from jinja2 import Environment
17
18
logger = logging.getLogger(__name__)
19
@@ -46,13 +43,8 @@ def create_template_env(
46
43
Configured Jinja2 environment
47
44
48
45
Raises:
49
- TemplateError: If Jinja2 is not installed or template_dir invalid
+ TemplateError: If template_dir invalid
50
"""
51
- if jinja2 is None:
52
- raise TemplateError(
53
- "Jinja2 is required for template functionality. "
54
- "Install with: pip install jinja2"
55
- )
56
57
# Setup loader
58
if template_dir and template_dir.exists():
json_explorer/codegen/languages/go/templates/imports.go.j2
json_explorer/codegen/languages/go/templates/package.go.j2
json_explorer/codegen/languages/go/templates/struct.go.j2
0 commit comments