Skip to content

Commit 005fc9d

Browse files
committed
refactor(jira): refactor message
1 parent 4171178 commit 005fc9d

File tree

1 file changed

+4
-11
lines changed

1 file changed

+4
-11
lines changed

commitizen/cz/jira/jira.py

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -43,18 +43,11 @@ def questions(self) -> Questions:
4343
},
4444
]
4545

46-
def message(self, answers: dict) -> str:
46+
def message(self, answers: dict[str, str]) -> str:
4747
return " ".join(
48-
filter(
49-
bool,
50-
[
51-
answers["message"],
52-
answers["issues"],
53-
answers["workflow"],
54-
answers["time"],
55-
answers["comment"],
56-
],
57-
)
48+
x
49+
for k in ("message", "issues", "workflow", "time", "comment")
50+
if (x := answers.get(k))
5851
)
5952

6053
def example(self) -> str:

0 commit comments

Comments
 (0)