# 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
                        other.priority, other.requires_output))
        else:
            return False

    def __repr__(self):
        return 'Rule(name={}, match={}, get_new_command={}, ' \
               'enabled_by_default={}, side_effect={}, ' \
               'priority={}, requires_output={})'.format(
                   self.name, self.match, self.get_new_command,
                   self.enabled_by_default, self.side_effect,
                   self.priority, self.requires_output)

    @classmethod
    def from_path(cls, path):
        """Creates rule instance from path.

        :type path: pathlib.Path
        :rtype: Rule

        """
        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

# 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

                        other.priority, other.requires_output))
        else:
            return False

    def __repr__(self):
        return 'Rule(name={}, match={}, get_new_command={}, ' \
               'enabled_by_default={}, side_effect={}, ' \
               'priority={}, requires_output={})'.format(
                   self.name, self.match, self.get_new_command,
                   self.enabled_by_default, self.side_effect,
                   self.priority, self.requires_output)

    @classmethod
    def from_path(cls, path):
        """Creates rule instance from path.

        :type path: pathlib.Path
        :rtype: Rule

        """
        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)