# Path: thefuck/conf.py
# class Settings(dict):
#     def __getattr__(self, item):
#     def __setattr__(self, key, value):
#     def init(self, args=None):
#     def _init_settings_file(self):
#     def _get_user_dir_path(self):
#     def _setup_user_dir(self):
#     def _settings_from_file(self):
#     def _rules_from_env(self, val):
#     def _priority_from_env(self, val):
#     def _val_from_env(self, env, attr):
#     def _settings_from_env(self):
#     def _settings_from_args(self, args):


import six
from ..conf import settings
from ..logs import warn
from ..shells import shell
from ..utils import which


def _get_alias(known_args):
    if six.PY2:
        warn("The Fuck will drop Python 2 support soon, more details "
             "https://github.com/nvbn/thefuck/issues/685")

    alias = shell.app_alias(known_args.alias)

    if known_args.enable_experimental_instant_mode:
        if six.PY2:
            warn("Instant mode requires Python 3")
        elif not which('script'):
            warn("Instant mode requires `script` app")
        else:
            return shell.instant_mode_alias(known_args.alias)

    return alias


def print_alias(known_args):

# Path: thefuck/conf.py
# class Settings(dict):
#     def __getattr__(self, item):
#     def __setattr__(self, key, value):
#     def init(self, args=None):
#     def _init_settings_file(self):
#     def _get_user_dir_path(self):
#     def _setup_user_dir(self):
#     def _settings_from_file(self):
#     def _rules_from_env(self, val):
#     def _priority_from_env(self, val):
#     def _val_from_env(self, env, attr):
#     def _settings_from_env(self):
#     def _settings_from_args(self, args):


# Path: thefuck/entrypoints/alias.py
import six
from ..conf import settings
from ..logs import warn
from ..shells import shell
from ..utils import which



def _get_alias(known_args):
    if six.PY2:
        warn("The Fuck will drop Python 2 support soon, more details "
             "https://github.com/nvbn/thefuck/issues/685")

    alias = shell.app_alias(known_args.alias)

    if known_args.enable_experimental_instant_mode:
        if six.PY2:
            warn("Instant mode requires Python 3")
        elif not which('script'):
            warn("Instant mode requires `script` app")
        else:
            return shell.instant_mode_alias(known_args.alias)

    return alias


def print_alias(known_args):

    settings.init(known_args)