We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 82db67d commit 1806fe8Copy full SHA for 1806fe8
commitizen/cz/customize/customize.py
@@ -1,9 +1,14 @@
1
from __future__ import annotations
2
3
-try:
+from typing import TYPE_CHECKING
4
+
5
+if TYPE_CHECKING:
6
from jinja2 import Template
-except ImportError:
- from string import Template # type: ignore
7
+else:
8
+ try:
9
+ from jinja2 import Template
10
+ except ImportError:
11
+ from string import Template
12
13
14
from commitizen import defaults
0 commit comments