mirror of
https://github.com/nvbn/thefuck.git
synced 2025-02-07 13:41:21 +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():
|
def test_get_new_command():
|
||||||
assert get_new_command(
|
assert get_new_command(Command('grep blah .')) == 'grep -r blah .'
|
||||||
Command('grep blah .')) == 'grep -r blah .'
|
|
||||||
|
@ -38,7 +38,7 @@ patterns = (
|
|||||||
def _make_pattern(pattern):
|
def _make_pattern(pattern):
|
||||||
pattern = pattern.replace('{file}', '(?P<file>[^:\n]+)') \
|
pattern = pattern.replace('{file}', '(?P<file>[^:\n]+)') \
|
||||||
.replace('{line}', '(?P<line>[0-9]+)') \
|
.replace('{line}', '(?P<line>[0-9]+)') \
|
||||||
.replace('{col}', '(?P<col>[0-9]+)')
|
.replace('{col}', '(?P<col>[0-9]+)')
|
||||||
return re.compile(pattern, re.MULTILINE)
|
return re.compile(pattern, re.MULTILINE)
|
||||||
patterns = [_make_pattern(p).search for p in patterns]
|
patterns = [_make_pattern(p).search for p in patterns]
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user