mirror of
https://github.com/nvbn/thefuck.git
synced 2025-01-31 10:11:14 +00:00
#552: Fix code style
This commit is contained in:
parent
cf352fd788
commit
d05eb0a6dc
@ -2,12 +2,14 @@ import pytest
|
|||||||
from thefuck.rules.remove_trailing_cedilla import match, get_new_command, CEDILLA
|
from thefuck.rules.remove_trailing_cedilla import match, get_new_command, CEDILLA
|
||||||
from tests.utils import Command
|
from tests.utils import Command
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.parametrize('command', [
|
@pytest.mark.parametrize('command', [
|
||||||
Command(script='wrong' + CEDILLA),
|
Command(script='wrong' + CEDILLA),
|
||||||
Command(script='wrong with args' + CEDILLA)])
|
Command(script='wrong with args' + CEDILLA)])
|
||||||
def test_match(command):
|
def test_match(command):
|
||||||
assert match(command)
|
assert match(command)
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.parametrize('command, new_command', [
|
@pytest.mark.parametrize('command, new_command', [
|
||||||
(Command('wrong' + CEDILLA), 'wrong'),
|
(Command('wrong' + CEDILLA), 'wrong'),
|
||||||
(Command('wrong with args' + CEDILLA), 'wrong with args')])
|
(Command('wrong with args' + CEDILLA), 'wrong with args')])
|
||||||
|
@ -1,9 +1,11 @@
|
|||||||
# encoding=utf8
|
# -*- encoding: utf-8 -*-
|
||||||
|
|
||||||
CEDILLA = u"ç"
|
CEDILLA = u"ç"
|
||||||
|
|
||||||
|
|
||||||
def match(command):
|
def match(command):
|
||||||
return command.script.endswith(CEDILLA)
|
return command.script.endswith(CEDILLA)
|
||||||
|
|
||||||
|
|
||||||
def get_new_command(command):
|
def get_new_command(command):
|
||||||
return command.script[:-1]
|
return command.script[:-1]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user