MCPcopy Index your code
hub / github.com/praw-dev/praw / update_package

Function update_package

tools/set_version.py:84–95  ·  view source on GitHub ↗
(version)

Source from the content-addressed store, hash-verified

82
83
84def update_package(version):
85 content = pathlib.Path("praw/const.py").read_text()
86
87 updated = re.sub(r'__version__ = "([^"]+)"', f'__version__ = "{version}"', content)
88 if content == updated:
89 sys.stderr.write("Package version string not changed\n")
90 return False
91
92 pathlib.Path("praw/const.py").write_text(updated)
93
94 print(version)
95 return True
96
97
98def valid_version(version):

Callers 2

handle_versionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…