<commit_before># encoding: utf-8

"""Mopidy documentation build configuration file"""

from __future__ import absolute_import, unicode_literals

import os
import sys


# -- Workarounds to have autodoc generate API docs ----------------------------

sys.path.insert(0, os.path.abspath(os.path.dirname(__file__)))
sys.path.insert(0, os.path.abspath(os.path.dirname(__file__) + '/../'))


class Mock(object):

    def __init__(self, *args, **kwargs):
        pass

    def __call__(self, *args, **kwargs):
        return Mock()

    def __or__(self, other):
        return Mock()

    @classmethod
    def __getattr__(self, name):
        if name in ('__file__', '__path__'):
            return '/dev/null'
        elif name == 'get_system_config_dirs':
            # glib.get_system_config_dirs()
            return tuple
        elif name == 'get_user_config_dir':
            # glib.get_user_config_dir()
            return str
        elif (name[0] == name[0].upper() and
                # gst.Caps
                not name.startswith('Caps') and
                # gst.PadTemplate
                not name.startswith('PadTemplate') and
                # dbus.String()
                not name == 'String'):
            return type(name, (), {})
        else:
            return Mock()

MOCK_MODULES = [
    'dbus',
    'dbus.mainloop',
    'dbus.mainloop.glib',
    'dbus.service',
    'glib',
    'gobject',
    'gst',
    'gst.pbutils',
    'pygst',
    'pykka',<commit_msg>docs: Update mocks for docs build without all deps<commit_after># encoding: utf-8

"""Mopidy documentation build configuration file"""

from __future__ import absolute_import, unicode_literals

import os
import sys


# -- Workarounds to have autodoc generate API docs ----------------------------

sys.path.insert(0, os.path.abspath(os.path.dirname(__file__)))
sys.path.insert(0, os.path.abspath(os.path.dirname(__file__) + '/../'))


class Mock(object):
    def __init__(self, *args, **kwargs):
        pass

    def __call__(self, *args, **kwargs):
        return Mock()

    def __or__(self, other):
        return Mock()

    @classmethod
    def __getattr__(self, name):
        if name == 'get_system_config_dirs':  # GLib.get_system_config_dirs()
            return list
        elif name == 'get_user_config_dir':  # GLib.get_user_config_dir()
            return str
        else:
            return Mock()


MOCK_MODULES = [
    'dbus',
    'dbus.mainloop',
    'dbus.mainloop.glib',
    'dbus.service',
    'mopidy.internal.gi',
    'pykka',
{'fraction_non_alphanumeric': 0.1495253164556962, 'fraction_numerical': 0.0031645569620253164, 'mean_word_length': 2.217557251908397, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3041162', 'n_tokens_mistral': 823, 'n_tokens_neox': 793, 'n_words': 180}