Skip to content

Commit

Permalink
fixup! Reuse "ref" instead of new "tag_ref" variable
Browse files Browse the repository at this point in the history
  • Loading branch information
chme committed Mar 21, 2024
1 parent dd64b03 commit 17a771e
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/git_changelog/commit.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,11 @@ def __init__(

tag = ""
for ref in refs.split(","):
tag_ref = ref.strip()
if tag_ref.startswith("tag: "):
tag_ref = tag_ref.replace("tag: ", "")
if _is_semver(tag_ref):
tag = tag_ref
ref = ref.strip() # noqa: PLW2901
if ref.startswith("tag: "):
ref = ref.replace("tag: ", "") # noqa: PLW2901
if _is_semver(ref):
tag = ref
break
self.tag: str = tag
self.version: str = tag
Expand Down

0 comments on commit 17a771e

Please sign in to comment.