Pass maxsplit via kwarg to re.split (#5215)

This commit is contained in:
David Lord 2023-08-16 13:35:13 -07:00 committed by GitHub
commit 6d266f6363
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -302,7 +302,7 @@ class ScriptInfo:
else:
if self.app_import_path:
path, name = (
re.split(r":(?![\\/])", self.app_import_path, 1) + [None]
re.split(r":(?![\\/])", self.app_import_path, maxsplit=1) + [None]
)[:2]
import_name = prepare_import(path)
app = locate_app(import_name, name)