MCPcopy
hub / github.com/pyodide/pyodide / create_pr_index

Method create_pr_index

tools/backport.py:330–341  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

328 self.cur_section = ChangelogSection()
329
330 def create_pr_index(self) -> None:
331 PR_NUMBER_RE = re.compile(r"{pr}`[0-9]+`")
332 for subsection_idx, subsection in enumerate(self.sections):
333 for paragraph_idx, paragraph in enumerate(subsection.paragraphs):
334 for entry_idx, entry in enumerate(paragraph.entries):
335 pr_strs = PR_NUMBER_RE.findall(entry.get_text())
336 is_unique = len(pr_strs) == 1
337 for pr_str in pr_strs:
338 pr = int(pr_str[5:-1])
339 self.pr_index[pr] = PrChangelogIndex(
340 subsection_idx, paragraph_idx, entry_idx, is_unique
341 )
342
343 def delete_entry(self, pr_changelog_index: PrChangelogIndex) -> None:
344 subsection = self.sections[pr_changelog_index.subsection]

Callers 6

show_missing_changelogsFunction · 0.80
make_changelog_branchFunction · 0.80
make_backport_branchFunction · 0.80
test_pr_indexFunction · 0.80

Calls 2

compileMethod · 0.80
get_textMethod · 0.45

Tested by 3

test_pr_indexFunction · 0.64