Skip to content

Commit aef0171

Browse files
committed
fix: fix linting error
1 parent 88532dc commit aef0171

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

commitizen/commands/init.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,9 +170,10 @@ def _ask_config_path(self) -> Path:
170170
def _ask_name(self) -> str:
171171
def construct_choice_with_description(cz_name: str) -> questionary.Choice:
172172
try:
173-
cz_class = registry.get(cz_name)(self.config)
173+
cz_class = registry.get(cz_name)
174174
if cz_class:
175-
first_example = cz_class.schema().partition("\n")[0]
175+
cz_obj = cz_class(self.config)
176+
first_example = cz_obj.schema().partition("\n")[0]
176177
return questionary.Choice(
177178
title=cz_name, value=cz_name, description=f"{first_example}"
178179
)

0 commit comments

Comments
 (0)