Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 8c2fa6f

Browse files
bearomorphismLee-W
authored andcommitted
refactor(git): refactor get_tag_names
1 parent a14d947 commit 8c2fa6f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎commitizen/git.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ def get_tag_names() -> list[str]:
277277
c = cmd.run("git tag --list")
278278
if c.err:
279279
return []
280-
return list(filter(None, (tag.strip() for tag in c.out.split("\n"))))
280+
return [tag for raw in c.out.split("\n")if (tag:=raw.strip())]
281281

282282

283283
def find_git_project_root() -> Path | None:

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /