Summary
re.split("", s) is flagged by RUF055 and fixed to s.split(""), but str.split raises ValueError: empty separator for empty separators while re.split succeeds:
import re
s = "abc"
re.split("", s) # ['', 'a', 'b', 'c', '']
s.split("") # ValueError: empty separator
Version
f1a9a70
Potential fix
Add a guard to skip if the separator is an empty string.
Summary
re.split("", s)is flagged by RUF055 and fixed tos.split(""), butstr.splitraisesValueError: empty separatorfor empty separators whilere.splitsucceeds:Version
f1a9a70
Potential fix
Add a guard to skip if the separator is an empty string.