mirror of
				https://github.com/nvbn/thefuck.git
				synced 2025-10-31 23:22:10 +00:00 
			
		
		
		
	make linter happy
This commit is contained in:
		| @@ -6,7 +6,7 @@ from .. import logs, types, const | |||||||
| from ..conf import settings | from ..conf import settings | ||||||
| from ..corrector import get_corrected_commands | from ..corrector import get_corrected_commands | ||||||
| from ..exceptions import EmptyCommand | from ..exceptions import EmptyCommand | ||||||
| from ..ui import select_command, confirm_command | from ..ui import select_command | ||||||
| from ..utils import get_alias, get_all_executables | from ..utils import get_alias, get_all_executables | ||||||
|  |  | ||||||
|  |  | ||||||
| @@ -41,7 +41,7 @@ def fix_command(known_args): | |||||||
|  |  | ||||||
|         corrected_commands = get_corrected_commands(command) |         corrected_commands = get_corrected_commands(command) | ||||||
|         selected_command = select_command(corrected_commands) |         selected_command = select_command(corrected_commands) | ||||||
|          |  | ||||||
|         if selected_command: |         if selected_command: | ||||||
|             selected_command.run(command) |             selected_command.run(command) | ||||||
|         else: |         else: | ||||||
|   | |||||||
| @@ -71,6 +71,7 @@ def confirm_text(corrected_command): | |||||||
|             reset=color(colorama.Style.RESET_ALL), |             reset=color(colorama.Style.RESET_ALL), | ||||||
|             blue=color(colorama.Fore.BLUE))) |             blue=color(colorama.Fore.BLUE))) | ||||||
|  |  | ||||||
|  |  | ||||||
| def double_confirm_text(confirmation_text): | def double_confirm_text(confirmation_text): | ||||||
|     sys.stderr.write( |     sys.stderr.write( | ||||||
|         (u'{prefix}{clear}{bold}{text}{reset} ' |         (u'{prefix}{clear}{bold}{text}{reset} ' | ||||||
| @@ -83,7 +84,7 @@ def double_confirm_text(confirmation_text): | |||||||
|             green=color(colorama.Fore.GREEN), |             green=color(colorama.Fore.GREEN), | ||||||
|             red=color(colorama.Fore.RED), |             red=color(colorama.Fore.RED), | ||||||
|             reset=color(colorama.Style.RESET_ALL), |             reset=color(colorama.Style.RESET_ALL), | ||||||
|             )) |         )) | ||||||
|  |  | ||||||
|  |  | ||||||
| def debug(msg): | def debug(msg): | ||||||
|   | |||||||
| @@ -6,7 +6,6 @@ from .exceptions import NoRuleMatched | |||||||
| from .system import get_key | from .system import get_key | ||||||
| from .utils import get_alias | from .utils import get_alias | ||||||
| from . import logs, const | from . import logs, const | ||||||
| from .types import CorrectedCommand |  | ||||||
|  |  | ||||||
|  |  | ||||||
| def read_actions(): | def read_actions(): | ||||||
| @@ -98,11 +97,11 @@ def select_command(corrected_commands): | |||||||
|             selector.next() |             selector.next() | ||||||
|             logs.confirm_text(selector.value) |             logs.confirm_text(selector.value) | ||||||
|  |  | ||||||
|      |     if settings.require_double_confirmation and selector.value.script in const.DOUBLE_CONFIRMATION_SCRIPTS: | ||||||
|     if not (settings.require_double_confirmation and selector.value.script in const.DOUBLE_CONFIRMATION_SCRIPTS): |         selector.value = double_confirm(const.DOUBLE_CONFIRMATION_SCRIPTS[selector.value.script]) | ||||||
|         return selector.value |  | ||||||
|          |  | ||||||
|     confirmation_text = const.DOUBLE_CONFIRMATION_SCRIPTS[selector.value.script] | def double_confirm(confirmation_text): | ||||||
|     logs.double_confirm_text(confirmation_text) |     logs.double_confirm_text(confirmation_text) | ||||||
|  |  | ||||||
|     for action in read_actions(): |     for action in read_actions(): | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user