From 6083cce8c1c6772d5e805fbe04a7017948e88bab Mon Sep 17 00:00:00 2001 From: "C.A.M. Gerlach" Date: Fri, 20 Oct 2023 17:09:48 -0500 Subject: [PATCH] Update version bump script in tools to write to __init__.py --- tools/set_version.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/set_version.py b/tools/set_version.py index deefc21..42901f8 100755 --- a/tools/set_version.py +++ b/tools/set_version.py @@ -41,7 +41,7 @@ def handle_version(version): def increment_development_version(): - with open("prawcore/const.py") as fp: + with open("prawcore/__init__.py") as fp: version = re.search('__version__ = "([^"]+)"', fp.read()).group(1) parsed_version = valid_version(version) @@ -89,7 +89,7 @@ def update_changelog(version): def update_package(version): - with open("prawcore/const.py") as fp: + with open("prawcore/__init__.py") as fp: content = fp.read() updated = re.sub('__version__ = "([^"]+)"', f'__version__ = "{version}"', content) @@ -97,7 +97,7 @@ def update_package(version): sys.stderr.write("Package version string not changed\n") return False - with open("prawcore/const.py", "w") as fp: + with open("prawcore/__init__.py", "w") as fp: fp.write(updated) print(version)