From 6754ebe20d5031fe2231cb3a747768422b32c969 Mon Sep 17 00:00:00 2001 From: mcarton Date: Sun, 23 Aug 2015 21:27:38 +0200 Subject: [PATCH] Fix some spelling mistakes --- tests/rules/test_mercurial.py | 6 +++--- thefuck/rules/dirty_untar.py | 4 ++-- thefuck/rules/mercurial.py | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/tests/rules/test_mercurial.py b/tests/rules/test_mercurial.py index 08962f91..8ef25198 100644 --- a/tests/rules/test_mercurial.py +++ b/tests/rules/test_mercurial.py @@ -2,7 +2,7 @@ import pytest from tests.utils import Command from thefuck.rules.mercurial import ( - extract_possisiblities, match, get_new_command + extract_possibilities, match, get_new_command ) @@ -96,8 +96,8 @@ def test_not_match(command): '\n rebase recover remove rename resolve revert' )), ['rebase', 'recover', 'remove', 'rename', 'resolve', 'revert']), ]) -def test_extract_possisiblities(command, possibilities): - assert extract_possisiblities(command) == possibilities +def test_extract_possibilities(command, possibilities): + assert extract_possibilities(command) == possibilities @pytest.mark.parametrize('command, new_command', [ diff --git a/thefuck/rules/dirty_untar.py b/thefuck/rules/dirty_untar.py index 8dc40488..25300e7b 100644 --- a/thefuck/rules/dirty_untar.py +++ b/thefuck/rules/dirty_untar.py @@ -13,12 +13,12 @@ def _is_tar_extract(cmd): def _tar_file(cmd): - tar_extentions = ('.tar', '.tar.Z', '.tar.bz2', '.tar.gz', '.tar.lz', + tar_extensions = ('.tar', '.tar.Z', '.tar.bz2', '.tar.gz', '.tar.lz', '.tar.lzma', '.tar.xz', '.taz', '.tb2', '.tbz', '.tbz2', '.tgz', '.tlz', '.txz', '.tz') for c in cmd.split(): - for ext in tar_extentions: + for ext in tar_extensions: if c.endswith(ext): return (c, c[0:len(c)-len(ext)]) diff --git a/thefuck/rules/mercurial.py b/thefuck/rules/mercurial.py index c9e7a1a1..c2e9aa6e 100644 --- a/thefuck/rules/mercurial.py +++ b/thefuck/rules/mercurial.py @@ -2,7 +2,7 @@ import re from thefuck.utils import get_closest -def extract_possisiblities(command): +def extract_possibilities(command): possib = re.findall(r'\n\(did you mean one of ([^\?]+)\?\)', command.stderr) if possib: return possib[0].split(', ') @@ -24,6 +24,6 @@ def match(command, settings): def get_new_command(command, settings): script = command.script.split(' ') - possisiblities = extract_possisiblities(command) - script[1] = get_closest(script[1], possisiblities) + possibilities = extract_possibilities(command) + script[1] = get_closest(script[1], possibilities) return ' '.join(script)