Skip to content

Commit 08fdd3a

Browse files
mrgalopesaleksihakli
authored andcommitted
Fix re.split deprecation warning
1 parent e4b31b9 commit 08fdd3a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

widget_tweaks/templatetags/widget_tweaks.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ def _process_field_attributes(field, attr, process):
1919
# split attribute name and value from 'attr:value' string
2020
# params = attr.split(':', 1)
2121
# attribute = params[0]
22-
params = re.split(r"(?<!:):(?!:)", attr, 1)
22+
params = re.split(r"(?<!:):(?!:)", attr, maxsplit=1)
2323
# attribute = params[0]
2424
attribute = params[0].replace("::", ":")
2525
value = params[1] if len(params) == 2 else True

0 commit comments

Comments
 (0)