Skip to content

Commit 188cc60

Browse files
committed
Address Python deprecation warning
* mx.graalpython/verify_patches.py:88: DeprecationWarning: 'maxsplit' is passed as positional argument part, exception = re.split(r'\s+WITH\s+', part, 1)
1 parent f7fe241 commit 188cc60

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mx.graalpython/verify_patches.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ def validate_metadata(patches_dir):
8585
for part in re.split(f'AND|OR', license_id):
8686
part = part.strip()
8787
if ' WITH ' in part:
88-
part, exception = re.split(r'\s+WITH\s+', part, 1)
88+
part, exception = re.split(r'\s+WITH\s+', part, maxsplit=1)
8989
assert exception in ALLOWED_WITH_CLAUSES, \
9090
f"License WITH clause {exception} not in allowed list of clauses: {', '.join(ALLOWED_WITH_CLAUSES)}"
9191
assert part in ALLOWED_LICENSES, \

0 commit comments

Comments
 (0)