Skip to content

Commit

Permalink
style(mypy): rewrite import to avoid unnecessary type ignore
Browse files Browse the repository at this point in the history
  • Loading branch information
Lee-W committed Nov 10, 2024
1 parent 82db67d commit 1806fe8
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions commitizen/cz/customize/customize.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
from __future__ import annotations

try:
from typing import TYPE_CHECKING

if TYPE_CHECKING:
from jinja2 import Template
except ImportError:
from string import Template # type: ignore
else:
try:
from jinja2 import Template
except ImportError:
from string import Template


from commitizen import defaults
Expand Down

0 comments on commit 1806fe8

Please sign in to comment.