Skip to content

Commit

Permalink
[fix] Fix old-style formatting re.sub(...) call
Browse files Browse the repository at this point in the history
  • Loading branch information
bbugyi200 committed Dec 7, 2019
1 parent 7fc7f15 commit c74192d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion black.py
Expand Up @@ -2743,7 +2743,7 @@ def validate_string_split(line: Line, line_length: int) -> None:

line_str = str(line).strip("\n")
line_str = re.sub(r"^ *assert .*, ?(['\"].*?)", r"\1", line_str)
line_str = re.sub(r"(.*)['\"] ?% ?\(?.*\)?", r"\1", line_str)
line_str = re.sub(r"(['\"].*[^\\]['\"]) ?% ?\(?.*\)?", r"\1", line_str)
line_str = re.sub(r"(['\"]\.[A-Za-z_0-9]+\().*\)?", r"\1", line_str)
line_str = re.sub(r"(.*['\"]) ?\+.*", r"\1", line_str)
line_str = re.sub(r".* ?\+ ?(['\"].*)", r"\1", line_str)
Expand Down

0 comments on commit c74192d

Please sign in to comment.