1
0
mirror of https://github.com/nvbn/thefuck.git synced 2025-02-21 04:18:55 +00:00

git_flag_after_filename: fix flake8 errors

These were found by creating a `.flake8` file containing:

    [flake8]
    ignore = E501,W503
    exclude = venv

then running:

    flake8 $(git diff master... --name-only)

See https://github.com/nvbn/thefuck/pull/563 for running `flake8` in CI
This commit is contained in:
Joseph Frazier 2016-10-31 00:08:30 -04:00
parent 5b420204c9
commit 9cae0bffff
2 changed files with 2 additions and 2 deletions

View File

@ -1,4 +1,3 @@
import pytest
from thefuck.rules.git_flag_after_filename import match, get_new_command
from tests.utils import Command

View File

@ -3,6 +3,7 @@ from thefuck.specific.git import git_support
error_pattern = "fatal: bad flag '(.*?)' used after filename"
@git_support
def match(command):
return re.search(error_pattern, command.stderr)
@ -24,6 +25,6 @@ def get_new_command(command):
# swap them
command_parts[bad_flag_index], command_parts[filename_index] = \
command_parts[filename_index], command_parts[bad_flag_index]
command_parts[filename_index], command_parts[bad_flag_index] # noqa: E122
return u' '.join(command_parts)