Fix a silly bug. Sigh.

Change-Id: Ia67342d56907053228895ed6cd65c98949bd7c43
Reviewed-on: https://code-review.googlesource.com/c/re2/+/63352
Reviewed-by: Paul Wankadia <junyer@google.com>
Reviewed-by: Alex Chernyakhovsky <achernya@google.com>
This commit is contained in:
Paul Wankadia
2024-06-21 19:58:35 +00:00
parent 0d992b4cef
commit 6144b62bec

View File

@@ -117,7 +117,7 @@ try:
):
with open(filename, 'r') as file:
contents = file.read()
filename = re.sub(r'^re2(?=\.py)', '__init__', contents)
filename = re.sub(r'^re2(?=\.py)', '__init__', filename)
contents = re.sub(r'^(?=import _)', 'from . ', contents, flags=re.MULTILINE)
with open(f'{PACKAGE}/{filename}', 'x') as file:
file.write(contents)