mirror of
https://github.com/nvbn/thefuck.git
synced 2025-02-22 04:48:57 +00:00
Fix flake8 errors: E305 expected 2 blank lines after class or function definition
This commit is contained in:
parent
78515c7bbb
commit
e009f0a05b
@ -33,6 +33,7 @@ def tar_error(tmpdir):
|
|||||||
|
|
||||||
return fixture
|
return fixture
|
||||||
|
|
||||||
|
|
||||||
parametrize_extensions = pytest.mark.parametrize('ext', tar_extensions)
|
parametrize_extensions = pytest.mark.parametrize('ext', tar_extensions)
|
||||||
|
|
||||||
# (filename as typed by the user, unquoted filename, quoted filename as per shells.quote)
|
# (filename as typed by the user, unquoted filename, quoted filename as per shells.quote)
|
||||||
|
@ -9,6 +9,7 @@ def match(command):
|
|||||||
def get_new_command(command):
|
def get_new_command(command):
|
||||||
return ' '.join(command.script_parts[1:])
|
return ' '.join(command.script_parts[1:])
|
||||||
|
|
||||||
|
|
||||||
# it should be rare enough to actually have to type twice the same word, so
|
# it should be rare enough to actually have to type twice the same word, so
|
||||||
# this rule can have a higher priority to come before things like "cd cd foo"
|
# this rule can have a higher priority to come before things like "cd cd foo"
|
||||||
priority = 900
|
priority = 900
|
||||||
|
@ -40,6 +40,8 @@ def _make_pattern(pattern):
|
|||||||
.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]
|
||||||
|
|
||||||
|
|
||||||
|
@ -11,6 +11,7 @@ def match(command):
|
|||||||
else:
|
else:
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
|
||||||
# git's output here is too complicated to be parsed (see the test file)
|
# git's output here is too complicated to be parsed (see the test file)
|
||||||
stash_commands = (
|
stash_commands = (
|
||||||
'apply',
|
'apply',
|
||||||
|
@ -6,4 +6,5 @@ def match(command):
|
|||||||
def get_new_command(command):
|
def get_new_command(command):
|
||||||
return u'man {}'.format(command.script[3:])
|
return u'man {}'.format(command.script[3:])
|
||||||
|
|
||||||
|
|
||||||
priority = 2000
|
priority = 2000
|
||||||
|
@ -13,4 +13,5 @@ def get_new_command(command):
|
|||||||
return [formatme.format(pacman, package, command.script)
|
return [formatme.format(pacman, package, command.script)
|
||||||
for package in packages]
|
for package in packages]
|
||||||
|
|
||||||
|
|
||||||
enabled_by_default, pacman = archlinux_env()
|
enabled_by_default, pacman = archlinux_env()
|
||||||
|
@ -35,6 +35,7 @@ def get_key():
|
|||||||
|
|
||||||
return ch
|
return ch
|
||||||
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
except ImportError:
|
except ImportError:
|
||||||
@ -44,5 +45,6 @@ except ImportError:
|
|||||||
def _expanduser(self):
|
def _expanduser(self):
|
||||||
return self.__class__(os.path.expanduser(str(self)))
|
return self.__class__(os.path.expanduser(str(self)))
|
||||||
|
|
||||||
|
|
||||||
if not hasattr(Path, 'expanduser'):
|
if not hasattr(Path, 'expanduser'):
|
||||||
Path.expanduser = _expanduser
|
Path.expanduser = _expanduser
|
||||||
|
@ -26,6 +26,7 @@ def get_key():
|
|||||||
encoding = sys.stdout.encoding or os.environ.get('PYTHONIOENCODING', 'utf-8')
|
encoding = sys.stdout.encoding or os.environ.get('PYTHONIOENCODING', 'utf-8')
|
||||||
return ch.decode(encoding)
|
return ch.decode(encoding)
|
||||||
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
except ImportError:
|
except ImportError:
|
||||||
@ -35,5 +36,6 @@ except ImportError:
|
|||||||
def _expanduser(self):
|
def _expanduser(self):
|
||||||
return self.__class__(os.path.expanduser(str(self)))
|
return self.__class__(os.path.expanduser(str(self)))
|
||||||
|
|
||||||
|
|
||||||
# pathlib's expanduser fails on windows, see http://bugs.python.org/issue19776
|
# pathlib's expanduser fails on windows, see http://bugs.python.org/issue19776
|
||||||
Path.expanduser = _expanduser
|
Path.expanduser = _expanduser
|
||||||
|
@ -40,6 +40,8 @@ def memoize(fn):
|
|||||||
return value
|
return value
|
||||||
|
|
||||||
return wrapper
|
return wrapper
|
||||||
|
|
||||||
|
|
||||||
memoize.disabled = False
|
memoize.disabled = False
|
||||||
|
|
||||||
|
|
||||||
@ -238,6 +240,8 @@ def cache(*depends_on):
|
|||||||
return value
|
return value
|
||||||
|
|
||||||
return _cache
|
return _cache
|
||||||
|
|
||||||
|
|
||||||
cache.disabled = False
|
cache.disabled = False
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user