# 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/const.py
# DEFAULT_PRIORITY = 1000
# 
# ALL_ENABLED = _GenConst('All rules enabled')


from imp import load_source
from . import logs
from .shells import shell
from .conf import settings
from .const import DEFAULT_PRIORITY, ALL_ENABLED
from .exceptions import EmptyCommand
from .utils import get_alias, format_raw_script
from .output_readers import get_output
import os
import sys

        """
        name = path.name[:-3]
        if name in settings.exclude_rules:
            logs.debug(u'Ignoring excluded rule: {}'.format(name))
            return
        with logs.debug_time(u'Importing rule: {};'.format(name)):
            try:
                rule_module = load_source(name, str(path))
            except Exception:
                logs.exception(u"Rule {} failed to load".format(name), sys.exc_info())
                return
        priority = getattr(rule_module, 'priority', DEFAULT_PRIORITY)
        return cls(name, rule_module.match,
                   rule_module.get_new_command,
                   getattr(rule_module, 'enabled_by_default', True),
                   getattr(rule_module, 'side_effect', None),
                   settings.priority.get(name, priority),
                   getattr(rule_module, 'requires_output', True))

    @property
    def is_enabled(self):
        """Returns `True` when rule enabled.

        :rtype: bool

        """
        return (
            self.name in settings.rules
            or self.enabled_by_default

# 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/const.py
# DEFAULT_PRIORITY = 1000
# 
# ALL_ENABLED = _GenConst('All rules enabled')


# Path: thefuck/types.py
from imp import load_source
from . import logs
from .shells import shell
from .conf import settings
from .const import DEFAULT_PRIORITY, ALL_ENABLED
from .exceptions import EmptyCommand
from .utils import get_alias, format_raw_script
from .output_readers import get_output
import os
import sys


        """
        name = path.name[:-3]
        if name in settings.exclude_rules:
            logs.debug(u'Ignoring excluded rule: {}'.format(name))
            return
        with logs.debug_time(u'Importing rule: {};'.format(name)):
            try:
                rule_module = load_source(name, str(path))
            except Exception:
                logs.exception(u"Rule {} failed to load".format(name), sys.exc_info())
                return
        priority = getattr(rule_module, 'priority', DEFAULT_PRIORITY)
        return cls(name, rule_module.match,
                   rule_module.get_new_command,
                   getattr(rule_module, 'enabled_by_default', True),
                   getattr(rule_module, 'side_effect', None),
                   settings.priority.get(name, priority),
                   getattr(rule_module, 'requires_output', True))

    @property
    def is_enabled(self):
        """Returns `True` when rule enabled.

        :rtype: bool

        """
        return (
            self.name in settings.rules
            or self.enabled_by_default

            and ALL_ENABLED in settings.rules