From d05eb0a6dc0902793adff3bbf182729c95513e5a Mon Sep 17 00:00:00 2001 From: Vladimir Iakovlev Date: Sun, 2 Oct 2016 17:19:33 +0200 Subject: [PATCH] #552: Fix code style --- tests/rules/test_remove_trailing_cedilla.py | 2 ++ thefuck/rules/remove_trailing_cedilla.py | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/rules/test_remove_trailing_cedilla.py b/tests/rules/test_remove_trailing_cedilla.py index 377ff8fc..d139984d 100644 --- a/tests/rules/test_remove_trailing_cedilla.py +++ b/tests/rules/test_remove_trailing_cedilla.py @@ -2,12 +2,14 @@ import pytest from thefuck.rules.remove_trailing_cedilla import match, get_new_command, CEDILLA from tests.utils import Command + @pytest.mark.parametrize('command', [ Command(script='wrong' + CEDILLA), Command(script='wrong with args' + CEDILLA)]) def test_match(command): assert match(command) + @pytest.mark.parametrize('command, new_command', [ (Command('wrong' + CEDILLA), 'wrong'), (Command('wrong with args' + CEDILLA), 'wrong with args')]) diff --git a/thefuck/rules/remove_trailing_cedilla.py b/thefuck/rules/remove_trailing_cedilla.py index 31186448..d7ec1773 100644 --- a/thefuck/rules/remove_trailing_cedilla.py +++ b/thefuck/rules/remove_trailing_cedilla.py @@ -1,9 +1,11 @@ -# encoding=utf8 +# -*- encoding: utf-8 -*- CEDILLA = u"รง" + def match(command): return command.script.endswith(CEDILLA) + def get_new_command(command): return command.script[:-1]