Skip to content

Commit 15a01ff

Browse files
j-t-1stefan6419846
andauthored
STY: Remove unnecessary assignment before return (#3184)
--------- Co-authored-by: Stefan <[email protected]>
1 parent 16f584f commit 15a01ff

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

make_release.py

+4-8
Original file line numberDiff line numberDiff line change
@@ -169,8 +169,7 @@ def get_changelog(changelog_path: str) -> str:
169169
170170
"""
171171
with open(changelog_path, encoding="utf-8") as fh:
172-
changelog = fh.read()
173-
return changelog
172+
return fh.read()
174173

175174

176175
def write_changelog(new_changelog: str, changelog_path: str) -> None:
@@ -273,12 +272,9 @@ def get_most_recent_git_tag() -> str:
273272
Most recently created git tag.
274273
275274
"""
276-
git_tag = str(
277-
subprocess.check_output(
278-
["git", "describe", "--tag", "--abbrev=0"], stderr=subprocess.STDOUT
279-
)
280-
).strip("'b\\n")
281-
return git_tag
275+
return subprocess.check_output(
276+
["git", "describe", "--tag", "--abbrev=0"], stderr=subprocess.STDOUT, text=True
277+
).strip()
282278

283279

284280
def get_author_mapping(line_count: int) -> Dict[str, str]:

0 commit comments

Comments
 (0)