Skip to content

Commit d5b402d

Browse files
Add early return
1 parent 7f013bc commit d5b402d

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

release.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -519,6 +519,13 @@ def tweak_readme(tag: Tag, filename: str = "README.rst", done: bool = False) ->
519519
lines[1] = underline
520520
content = "\n".join(lines)
521521

522+
if done:
523+
# Post-release only changes the version line; the substitutions below
524+
# already ran at bump time, and skipping them avoids the PEP fetch.
525+
readme.write_text(content)
526+
print("done")
527+
return
528+
522529
DOCS_URL = r"https://docs\.python\.org/"
523530
X_Y = r"\d+\.\d+"
524531

0 commit comments

Comments
 (0)