We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7506662 commit 983f825Copy full SHA for 983f825
1 file changed
path/__init__.py
@@ -58,10 +58,10 @@
58
59
LINESEPS = ['\r\n', '\r', '\n']
60
U_LINESEPS = LINESEPS + ['\u0085', '\u2028', '\u2029']
61
-U_NEWLINE = re.compile('|'.join(U_LINESEPS))
62
B_NEWLINE = re.compile('|'.join(LINESEPS).encode())
63
-B_NL_END = re.compile(f'(?:{B_NEWLINE.pattern.decode()})$'.encode())
64
-U_NL_END = re.compile(f'(?:{U_NEWLINE.pattern})$')
+U_NEWLINE = re.compile('|'.join(U_LINESEPS))
+B_NL_END = re.compile(B_NEWLINE.pattern + b'$')
+U_NL_END = re.compile(U_NEWLINE.pattern + '$')
65
66
67
class TreeWalkWarning(Warning):
0 commit comments