mirror of
https://github.com/nvbn/thefuck.git
synced 2025-02-22 21:08:48 +00:00
#682: Warn on instant mode with Python 2
This commit is contained in:
parent
1b694fae7b
commit
6fac0622e5
@ -5,6 +5,7 @@ init_output()
|
|||||||
|
|
||||||
from pprint import pformat # noqa: E402
|
from pprint import pformat # noqa: E402
|
||||||
import sys # noqa: E402
|
import sys # noqa: E402
|
||||||
|
import six # noqa: E402
|
||||||
from . import logs, types # noqa: E402
|
from . import logs, types # noqa: E402
|
||||||
from .shells import shell # noqa: E402
|
from .shells import shell # noqa: E402
|
||||||
from .conf import settings # noqa: E402
|
from .conf import settings # noqa: E402
|
||||||
@ -13,6 +14,7 @@ from .exceptions import EmptyCommand # noqa: E402
|
|||||||
from .ui import select_command # noqa: E402
|
from .ui import select_command # noqa: E402
|
||||||
from .argument_parser import Parser # noqa: E402
|
from .argument_parser import Parser # noqa: E402
|
||||||
from .utils import get_installation_info # noqa: E402
|
from .utils import get_installation_info # noqa: E402
|
||||||
|
from .logs import warn # noqa: E402
|
||||||
|
|
||||||
|
|
||||||
def fix_command(known_args):
|
def fix_command(known_args):
|
||||||
@ -51,7 +53,11 @@ def main():
|
|||||||
fix_command(known_args)
|
fix_command(known_args)
|
||||||
elif known_args.alias:
|
elif known_args.alias:
|
||||||
if known_args.enable_experimental_instant_mode:
|
if known_args.enable_experimental_instant_mode:
|
||||||
alias = shell.instant_mode_alias(known_args.alias)
|
if six.PY2:
|
||||||
|
warn("Instant mode not supported with Python 2")
|
||||||
|
alias = shell.app_alias(known_args.alias)
|
||||||
|
else:
|
||||||
|
alias = shell.instant_mode_alias(known_args.alias)
|
||||||
else:
|
else:
|
||||||
alias = shell.app_alias(known_args.alias)
|
alias = shell.app_alias(known_args.alias)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user