|
2 | 2 |
|
3 | 3 | from typing import TYPE_CHECKING
|
4 | 4 |
|
| 5 | +from commitizen.question import CzQuestion |
| 6 | + |
5 | 7 | if TYPE_CHECKING:
|
6 | 8 | from jinja2 import Template
|
7 | 9 | else:
|
|
14 | 16 | from commitizen import defaults
|
15 | 17 | from commitizen.config import BaseConfig
|
16 | 18 | from commitizen.cz.base import BaseCommitizen
|
17 | | -from commitizen.defaults import Questions |
18 | 19 | from commitizen.exceptions import MissingCzCustomizeConfigError
|
19 | 20 |
|
20 | 21 | __all__ = ["CustomizeCommitsCz"]
|
@@ -45,8 +46,8 @@ def __init__(self, config: BaseConfig):
|
45 | 46 | if value := self.custom_settings.get(attr_name):
|
46 | 47 | setattr(self, attr_name, value)
|
47 | 48 |
|
48 | | - def questions(self) -> Questions: |
49 | | - return self.custom_settings.get("questions", [{}]) |
| 49 | + def questions(self) -> list[CzQuestion]: |
| 50 | + return self.custom_settings.get("questions", [{}])# type: ignore |
50 | 51 |
|
51 | 52 | def message(self, answers: dict) -> str:
|
52 | 53 | message_template = Template(self.custom_settings.get("message_template", ""))
|
|
0 commit comments