mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-20 01:24:42 +04:00
Fix invalid escape sequences
This commit is contained in:
parent
a12feebf4b
commit
37c94bbe71
2 changed files with 2 additions and 2 deletions
|
|
@ -53,7 +53,7 @@ def broken_deep_listdir(): # pragma: no cover (platform specific)
|
||||||
except OSError:
|
except OSError:
|
||||||
return True
|
return True
|
||||||
try:
|
try:
|
||||||
os.listdir(b'\\\\?\C:' + b'\\' * 300)
|
os.listdir(b'\\\\?\\C:' + b'\\' * 300)
|
||||||
except TypeError:
|
except TypeError:
|
||||||
return True
|
return True
|
||||||
except OSError:
|
except OSError:
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@ def try_repo_opts(repo, ref=None, **kwargs):
|
||||||
|
|
||||||
def _get_out(cap_out):
|
def _get_out(cap_out):
|
||||||
out = cap_out.get().replace('\r\n', '\n')
|
out = cap_out.get().replace('\r\n', '\n')
|
||||||
out = re.sub('\[INFO\].+\n', '', out)
|
out = re.sub(r'\[INFO\].+\n', '', out)
|
||||||
start, using_config, config, rest = out.split('=' * 79 + '\n')
|
start, using_config, config, rest = out.split('=' * 79 + '\n')
|
||||||
assert start == ''
|
assert start == ''
|
||||||
assert using_config == 'Using config:\n'
|
assert using_config == 'Using config:\n'
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue