Skip to content

Commit b948251

Browse files
authored
fix: set string to raw
set a string to raw. it is used in a regex, and the \ should be escaped to be visible to the regex.
1 parent 9f5bec9 commit b948251

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

jupyterlab_code_formatter/formatters.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ class RunScriptEscaper(BaseLineEscaper):
107107
unesacpe_start = len(escaped_line_start)
108108

109109
def escape(self, line: str) -> str:
110-
if re.match(pattern="run\s+\w+", string=line.lstrip()):
110+
if re.match(pattern=r"run\s+\w+", string=line.lstrip()):
111111
line = f"{self.escaped_line_start}{line}"
112112
return line
113113

0 commit comments

Comments
 (0)