Skip to content

Commit e489b14

Browse files
authored
Fix new_proposal.py to include "Abstract" section (#2139)
"Proposal" was hard-coded as the first section and so it was deleting the "Abstract" section along with the "TODO" section.
1 parent 51d6caf commit e489b14

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

proposals/scripts/new_proposal.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ def _fill_template(template_path: str, title: str, pr_num: int) -> str:
9898
r"\g<1>%d" % pr_num,
9999
content,
100100
)
101-
content = re.sub(r"## TODO(?:.|\n)*(## Problem)", r"\1", content)
101+
content = re.sub(r"\n## TODO(?:|\n)*?(\n## )", r"\1", content)
102102
return content
103103

104104

proposals/scripts/new_proposal_test.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ def test_fill_template(self):
5050
"pull/123)" in content,
5151
content,
5252
)
53+
self.assertTrue("\n## Abstract\n\n" in content, content)
5354

5455
def test_run_success(self):
5556
new_proposal._run(["true"])

0 commit comments

Comments
 (0)