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:
parent
ae2949cfa2
commit
465f6191b0
@ -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 .'
|
||||
|
@ -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]
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user