mirror of
				https://github.com/nvbn/thefuck.git
				synced 2025-10-31 07:04:12 +00:00 
			
		
		
		
	Fix flake8 errors: E305 expected 2 blank lines after class or function definition
This commit is contained in:
		| @@ -33,6 +33,7 @@ def tar_error(tmpdir): | ||||
|  | ||||
|     return fixture | ||||
|  | ||||
|  | ||||
| parametrize_extensions = pytest.mark.parametrize('ext', tar_extensions) | ||||
|  | ||||
| # (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): | ||||
|     return ' '.join(command.script_parts[1:]) | ||||
|  | ||||
|  | ||||
| # 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" | ||||
| priority = 900 | ||||
|   | ||||
| @@ -40,6 +40,8 @@ def _make_pattern(pattern): | ||||
|                      .replace('{line}', '(?P<line>[0-9]+)') \ | ||||
|                      .replace('{col}', '(?P<col>[0-9]+)') | ||||
|     return re.compile(pattern, re.MULTILINE) | ||||
|  | ||||
|  | ||||
| patterns = [_make_pattern(p).search for p in patterns] | ||||
|  | ||||
|  | ||||
|   | ||||
| @@ -11,6 +11,7 @@ def match(command): | ||||
|     else: | ||||
|         return False | ||||
|  | ||||
|  | ||||
| # git's output here is too complicated to be parsed (see the test file) | ||||
| stash_commands = ( | ||||
|     'apply', | ||||
|   | ||||
| @@ -6,4 +6,5 @@ def match(command): | ||||
| def get_new_command(command): | ||||
|     return u'man {}'.format(command.script[3:]) | ||||
|  | ||||
|  | ||||
| priority = 2000 | ||||
|   | ||||
| @@ -13,4 +13,5 @@ def get_new_command(command): | ||||
|     return [formatme.format(pacman, package, command.script) | ||||
|             for package in packages] | ||||
|  | ||||
|  | ||||
| enabled_by_default, pacman = archlinux_env() | ||||
|   | ||||
| @@ -35,6 +35,7 @@ def get_key(): | ||||
|  | ||||
|     return ch | ||||
|  | ||||
|  | ||||
| try: | ||||
|     from pathlib import Path | ||||
| except ImportError: | ||||
| @@ -44,5 +45,6 @@ except ImportError: | ||||
| def _expanduser(self): | ||||
|     return self.__class__(os.path.expanduser(str(self))) | ||||
|  | ||||
|  | ||||
| if not hasattr(Path, 'expanduser'): | ||||
|     Path.expanduser = _expanduser | ||||
|   | ||||
| @@ -26,6 +26,7 @@ def get_key(): | ||||
|     encoding = sys.stdout.encoding or os.environ.get('PYTHONIOENCODING', 'utf-8') | ||||
|     return ch.decode(encoding) | ||||
|  | ||||
|  | ||||
| try: | ||||
|     from pathlib import Path | ||||
| except ImportError: | ||||
| @@ -35,5 +36,6 @@ except ImportError: | ||||
| def _expanduser(self): | ||||
|     return self.__class__(os.path.expanduser(str(self))) | ||||
|  | ||||
|  | ||||
| # pathlib's expanduser fails on windows, see http://bugs.python.org/issue19776 | ||||
| Path.expanduser = _expanduser | ||||
|   | ||||
| @@ -40,6 +40,8 @@ def memoize(fn): | ||||
|         return value | ||||
|  | ||||
|     return wrapper | ||||
|  | ||||
|  | ||||
| memoize.disabled = False | ||||
|  | ||||
|  | ||||
| @@ -238,6 +240,8 @@ def cache(*depends_on): | ||||
|                 return value | ||||
|  | ||||
|     return _cache | ||||
|  | ||||
|  | ||||
| cache.disabled = False | ||||
|  | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user