1
0
mirror of https://github.com/nvbn/thefuck.git synced 2025-01-31 10:11:14 +00:00

#N/A Cleanup and adjust syntax

This commit is contained in:
Pablo Santiago Blum de Aguiar 2015-11-22 01:19:24 -02:00
parent ae2949cfa2
commit 465f6191b0
2 changed files with 2 additions and 3 deletions

View File

@ -8,5 +8,4 @@ def test_match():
def test_get_new_command():
assert get_new_command(
Command('grep blah .')) == 'grep -r blah .'
assert get_new_command(Command('grep blah .')) == 'grep -r blah .'

View File

@ -38,7 +38,7 @@ patterns = (
def _make_pattern(pattern):
pattern = pattern.replace('{file}', '(?P<file>[^:\n]+)') \
.replace('{line}', '(?P<line>[0-9]+)') \
.replace('{col}', '(?P<col>[0-9]+)')
.replace('{col}', '(?P<col>[0-9]+)')
return re.compile(pattern, re.MULTILINE)
patterns = [_make_pattern(p).search for p in patterns]