MCPcopy
hub / github.com/aio-libs/aiohttp / main

Function main

tools/cleanup_changes.py:27–41  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

25
26
27def main():
28 root = Path(__file__).parent.parent
29 delete = []
30 changes = (root / "CHANGES.rst").read_text()
31 for fname in (root / "CHANGES").iterdir():
32 match = PATTERN.match(fname.name)
33 if match is not None:
34 commit_issue_or_pr = match.group(1)
35 tst_issue_or_pr = f":issue:`{commit_issue_or_pr}`"
36 tst_commit = f":commit:`{commit_issue_or_pr}`"
37 if tst_issue_or_pr in changes or tst_commit in changes:
38 subprocess.run(["git", "rm", fname])
39 delete.append(fname.name)
40 print("Deleted CHANGES records:", " ".join(delete))
41 print("Please verify and commit")
42
43
44if __name__ == "__main__":

Callers 1

cleanup_changes.pyFile · 0.70

Calls 3

runMethod · 0.80
appendMethod · 0.80
matchMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…