We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Battery and Image widgets gone from the docs
If you compare the docs for [v0.12.0](http://docs.qtile.org/en/v0.12.0/manual/ref/widgets.html) with [v0.13.0](http://docs.qtile.org/en/v0.13.0/manual/ref/widgets.html) you may notice that:

- `libqtile.widget.Battery` and `libqtile.widget.BatteryIcon` are missing in 0.13.0,
- the description of `libqtile.widget.Image` in 0.13.0 consists of:
  `alias of libqtile.widget.import_error.make_error.<locals>.ImportErrorWidget`

This is most likely due to some modules missing from the documentation building environment. Somewhere in your Sphinx logs there are probably messages like these:

        Unmet dependencies for optional Widget: '.widget.battery.Battery'
        Unmet dependencies for optional Widget: '.widget.battery.BatteryIcon'
        Unmet dependencies for optional Widget: '.widget.image.Image'

My guess is that this has something to do with importing `images` from `..`, as those are the only imports that had changed for the affected widgets.

Note that the docs for the `Volume` widget are OK despite `from .. import images` in the widget code. But here the import is done lazily in a setup function rather than at the top of the module:
https://github.com/qtile/qtile/blob/78d0c9b3d13cddd88795d7607af47abb10d50e1b/libqtile/widget/volume.py#L170-L171

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `docs/conf.py`
Content:
```
1 # -*- coding: utf-8 -*-
2 #
3 # Qtile documentation build configuration file, created by
4 # sphinx-quickstart on Sat Feb 11 15:20:21 2012.
5 #
6 # This file is execfile()d with the current directory set to its containing dir.
7 #
8 # Note that not all possible configuration values are present in this
9 # autogenerated file.
10 #
11 # All configuration values have a default; values that are commented out
12 # serve to show the default.
13 
14 import os
15 import sys
16 from unittest.mock import MagicMock
17 
18 
19 class Mock(MagicMock):
20     # xcbq does a dir() on objects and pull stuff out of them and tries to sort
21     # the result. MagicMock has a bunch of stuff that can't be sorted, so let's
22     # like about dir().
23     def __dir__(self):
24         return []
25 
26 MOCK_MODULES = [
27     'libqtile._ffi_pango',
28     'libqtile.core._ffi_xcursors',
29     'cairocffi',
30     'cffi',
31     'dateutil',
32     'dateutil.parser',
33     'dbus',
34     'dbus.mainloop.glib',
35     'iwlib',
36     'keyring',
37     'mpd',
38     'trollius',
39     'xcffib',
40     'xcffib.randr',
41     'xcffib.xfixes',
42     'xcffib.xinerama',
43     'xcffib.xproto',
44     'xdg.IconTheme',
45 ]
46 sys.modules.update((mod_name, Mock()) for mod_name in MOCK_MODULES)
47 
48 # If extensions (or modules to document with autodoc) are in another directory,
49 # add these directories to sys.path here. If the directory is relative to the
50 # documentation root, use os.path.abspath to make it absolute, like shown here.
51 sys.path.insert(0, os.path.abspath('.'))
52 sys.path.insert(0, os.path.abspath('../'))
53 
54 # -- General configuration -----------------------------------------------------
55 
56 # If your documentation needs a minimal Sphinx version, state it here.
57 #needs_sphinx = '1.0'
58 
59 # Add any Sphinx extension module names here, as strings. They can be extensions
60 # coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
61 extensions = [
62     'sphinx.ext.autodoc',
63     'sphinx.ext.autosummary',
64     'sphinx.ext.coverage',
65     'sphinx.ext.graphviz',
66     'sphinx.ext.todo',
67     'sphinx.ext.viewcode',
68     'sphinxcontrib.seqdiag',
69     'sphinx_qtile',
70     'numpydoc',
71 ]
72 
73 numpydoc_show_class_members = False
74 
75 # Add any paths that contain templates here, relative to this directory.
76 templates_path = []
77 
78 # The suffix of source filenames.
79 source_suffix = '.rst'
80 
81 # The encoding of source files.
82 #source_encoding = 'utf-8-sig'
83 
84 # The master toctree document.
85 master_doc = 'index'
86 
87 # General information about the project.
88 project = u'Qtile'
89 copyright = u'2008-2018, Aldo Cortesi and contributers'
90 
91 # The version info for the project you're documenting, acts as replacement for
92 # |version| and |release|, also used in various other places throughout the
93 # built documents.
94 #
95 # The short X.Y version.
96 version = '0.13.0'
97 # The full version, including alpha/beta/rc tags.
98 release = version
99 
100 # The language for content autogenerated by Sphinx. Refer to documentation
101 # for a list of supported languages.
102 #language = None
103 
104 # There are two options for replacing |today|: either, you set today to some
105 # non-false value, then it is used:
106 #today = ''
107 # Else, today_fmt is used as the format for a strftime call.
108 #today_fmt = '%B %d, %Y'
109 
110 # List of patterns, relative to source directory, that match files and
111 # directories to ignore when looking for source files.
112 exclude_patterns = ['_build', 'man']
113 
114 # The reST default role (used for this markup: `text`) to use for all documents.
115 #default_role = None
116 
117 # If true, '()' will be appended to :func: etc. cross-reference text.
118 #add_function_parentheses = True
119 
120 # If true, the current module name will be prepended to all description
121 # unit titles (such as .. function::).
122 #add_module_names = True
123 
124 # If true, sectionauthor and moduleauthor directives will be shown in the
125 # output. They are ignored by default.
126 #show_authors = False
127 
128 # The name of the Pygments (syntax highlighting) style to use.
129 pygments_style = 'sphinx'
130 
131 # A list of ignored prefixes for module index sorting.
132 #modindex_common_prefix = []
133 
134 # If true, `todo` and `todoList` produce output, else they produce nothing.
135 todo_include_todos = True
136 
137 
138 # -- Options for HTML output --------fautod-------------------------------------------
139 
140 # The theme to use for HTML and HTML Help pages.  See the documentation for
141 # a list of builtin themes.
142 #html_theme = 'default'
143 
144 # Theme options are theme-specific and customize the look and feel of a theme
145 # further.  For a list of options available for each theme, see the
146 # documentation.
147 #html_theme_options = {}
148 
149 # Add any paths that contain custom themes here, relative to this directory.
150 #html_theme_path = []
151 
152 # The name for this set of Sphinx documents.  If None, it defaults to
153 # "<project> v<release> documentation".
154 #html_title = None
155 
156 # A shorter title for the navigation bar.  Default is the same as html_title.
157 #html_short_title = None
158 
159 # The name of an image file (relative to this directory) to place at the top
160 # of the sidebar.
161 #html_logo = None
162 
163 # The name of an image file (within the static path) to use as favicon of the
164 # docs.  This file should be a Windows icon file (.ico) being 16x16 or 32x32
165 # pixels large.
166 html_favicon = '_static/favicon.ico'
167 
168 # Add any paths that contain custom static files (such as style sheets) here,
169 # relative to this directory. They are copied after the builtin static files,
170 # so a file named "default.css" will overwrite the builtin "default.css".
171 html_static_path = ['_static']
172 
173 # If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
174 # using the given strftime format.
175 #html_last_updated_fmt = '%b %d, %Y'
176 
177 # If true, SmartyPants will be used to convert quotes and dashes to
178 # typographically correct entities.
179 #html_use_smartypants = True
180 
181 # Custom sidebar templates, maps document names to template names.
182 #html_sidebars = {}
183 
184 # Additional templates that should be rendered to pages, maps page names to
185 # template names.
186 #html_additional_pages = {'index': 'index.html'}
187 
188 # If false, no module index is generated.
189 #html_domain_indices = True
190 
191 # If false, no index is generated.
192 html_use_index = True
193 
194 # If true, the index is split into individual pages for each letter.
195 #html_split_index = False
196 
197 # If true, links to the reST sources are added to the pages.
198 #html_show_sourcelink = True
199 
200 # If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
201 #html_show_sphinx = True
202 
203 # If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
204 #html_show_copyright = True
205 
206 # If true, an OpenSearch description file will be output, and all pages will
207 # contain a <link> tag referring to it.  The value of this option must be the
208 # base URL from which the finished HTML is served.
209 #html_use_opensearch = ''
210 
211 # This is the file name suffix for HTML files (e.g. ".xhtml").
212 #html_file_suffix = None
213 
214 # Output file base name for HTML help builder.
215 htmlhelp_basename = 'Qtiledoc'
216 
217 
218 # -- Options for LaTeX output --------------------------------------------------
219 
220 latex_elements = {
221 # The paper size ('letterpaper' or 'a4paper').
222 #'papersize': 'letterpaper',
223 
224 # The font size ('10pt', '11pt' or '12pt').
225 #'pointsize': '10pt',
226 
227 # Additional stuff for the LaTeX preamble.
228 #'preamble': '',
229 }
230 
231 # Grouping the document tree into LaTeX files. List of tuples
232 # (source start file, target name, title, author, documentclass [howto/manual]).
233 latex_documents = [
234   ('index', 'Qtile.tex', u'Qtile Documentation',
235    u'Aldo Cortesi', 'manual'),
236 ]
237 
238 # The name of an image file (relative to this directory) to place at the top of
239 # the title page.
240 #latex_logo = None
241 
242 # For "manual" documents, if this is true, then toplevel headings are parts,
243 # not chapters.
244 #latex_use_parts = False
245 
246 # If true, show page references after internal links.
247 #latex_show_pagerefs = False
248 
249 # If true, show URL addresses after external links.
250 #latex_show_urls = False
251 
252 # Documents to append as an appendix to all manuals.
253 #latex_appendices = []
254 
255 # If false, no module index is generated.
256 #latex_domain_indices = True
257 
258 
259 # -- Options for manual page output --------------------------------------------
260 
261 # One entry per manual page. List of tuples
262 # (source start file, name, description, authors, manual section).
263 man_pages = [
264     ('man/qtile', 'qtile', u'Qtile Documentation',
265      [u'Tycho Andersen'], 1),
266     ('man/qshell', 'qshell', u'Qtile Documentation',
267      [u'Tycho Andersen'], 1),
268 ]
269 
270 # If true, show URL addresses after external links.
271 #man_show_urls = False
272 
273 
274 # -- Options for Texinfo output ------------------------------------------------
275 
276 # Grouping the document tree into Texinfo files. List of tuples
277 # (source start file, target name, title, author,
278 #  dir menu entry, description, category)
279 texinfo_documents = [
280   ('index', 'Qtile', u'Qtile Documentation',
281    u'Aldo Cortesi', 'Qtile', 'A hackable tiling window manager.',
282    'Miscellaneous'),
283 ]
284 
285 # Documents to append as an appendix to all manuals.
286 #texinfo_appendices = []
287 
288 # If false, no module index is generated.
289 #texinfo_domain_indices = True
290 
291 # How to display URL addresses: 'footnote', 'no', or 'inline'.
292 #texinfo_show_urls = 'footnote'
293 
294 # only import and set the theme if we're building docs locally
295 if not os.environ.get('READTHEDOCS'):
296     import sphinx_rtd_theme
297     html_theme = 'sphinx_rtd_theme'
298     html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
299 
300 
301 graphviz_dot_args = ['-Lg']
302 
303 # A workaround for the responsive tables always having annoying scrollbars.
304 def setup(app):
305     app.add_stylesheet("no_scrollbars.css")
306
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/docs/conf.py b/docs/conf.py
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -27,6 +27,7 @@
     'libqtile._ffi_pango',
     'libqtile.core._ffi_xcursors',
     'cairocffi',
+    'cairocffi.pixbuf',
     'cffi',
     'dateutil',
     'dateutil.parser',

{"golden_diff": "diff --git a/docs/conf.py b/docs/conf.py\n--- a/docs/conf.py\n+++ b/docs/conf.py\n@@ -27,6 +27,7 @@\n     'libqtile._ffi_pango',\n     'libqtile.core._ffi_xcursors',\n     'cairocffi',\n+    'cairocffi.pixbuf',\n     'cffi',\n     'dateutil',\n     'dateutil.parser',\n", "issue": "Battery and Image widgets gone from the docs\nIf you compare the docs for [v0.12.0](http://docs.qtile.org/en/v0.12.0/manual/ref/widgets.html) with [v0.13.0](http://docs.qtile.org/en/v0.13.0/manual/ref/widgets.html) you may notice that:\r\n\r\n- `libqtile.widget.Battery` and `libqtile.widget.BatteryIcon` are missing in 0.13.0,\r\n- the description of `libqtile.widget.Image` in 0.13.0 consists of:\r\n  `alias of libqtile.widget.import_error.make_error.<locals>.ImportErrorWidget`\r\n\r\nThis is most likely due to some modules missing from the documentation building environment. Somewhere in your Sphinx logs there are probably messages like these:\r\n\r\n        Unmet dependencies for optional Widget: '.widget.battery.Battery'\r\n        Unmet dependencies for optional Widget: '.widget.battery.BatteryIcon'\r\n        Unmet dependencies for optional Widget: '.widget.image.Image'\r\n\r\nMy guess is that this has something to do with importing `images` from `..`, as those are the only imports that had changed for the affected widgets.\r\n\r\nNote that the docs for the `Volume` widget are OK despite `from .. import images` in the widget code. But here the import is done lazily in a setup function rather than at the top of the module:\r\nhttps://github.com/qtile/qtile/blob/78d0c9b3d13cddd88795d7607af47abb10d50e1b/libqtile/widget/volume.py#L170-L171\n", "before_files": [{"content": "# -*- coding: utf-8 -*-\n#\n# Qtile documentation build configuration file, created by\n# sphinx-quickstart on Sat Feb 11 15:20:21 2012.\n#\n# This file is execfile()d with the current directory set to its containing dir.\n#\n# Note that not all possible configuration values are present in this\n# autogenerated file.\n#\n# All configuration values have a default; values that are commented out\n# serve to show the default.\n\nimport os\nimport sys\nfrom unittest.mock import MagicMock\n\n\nclass Mock(MagicMock):\n    # xcbq does a dir() on objects and pull stuff out of them and tries to sort\n    # the result. MagicMock has a bunch of stuff that can't be sorted, so let's\n    # like about dir().\n    def __dir__(self):\n        return []\n\nMOCK_MODULES = [\n    'libqtile._ffi_pango',\n    'libqtile.core._ffi_xcursors',\n    'cairocffi',\n    'cffi',\n    'dateutil',\n    'dateutil.parser',\n    'dbus',\n    'dbus.mainloop.glib',\n    'iwlib',\n    'keyring',\n    'mpd',\n    'trollius',\n    'xcffib',\n    'xcffib.randr',\n    'xcffib.xfixes',\n    'xcffib.xinerama',\n    'xcffib.xproto',\n    'xdg.IconTheme',\n]\nsys.modules.update((mod_name, Mock()) for mod_name in MOCK_MODULES)\n\n# If extensions (or modules to document with autodoc) are in another directory,\n# add these directories to sys.path here. If the directory is relative to the\n# documentation root, use os.path.abspath to make it absolute, like shown here.\nsys.path.insert(0, os.path.abspath('.'))\nsys.path.insert(0, os.path.abspath('../'))\n\n# -- General configuration -----------------------------------------------------\n\n# If your documentation needs a minimal Sphinx version, state it here.\n#needs_sphinx = '1.0'\n\n# Add any Sphinx extension module names here, as strings. They can be extensions\n# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.\nextensions = [\n    'sphinx.ext.autodoc',\n    'sphinx.ext.autosummary',\n    'sphinx.ext.coverage',\n    'sphinx.ext.graphviz',\n    'sphinx.ext.todo',\n    'sphinx.ext.viewcode',\n    'sphinxcontrib.seqdiag',\n    'sphinx_qtile',\n    'numpydoc',\n]\n\nnumpydoc_show_class_members = False\n\n# Add any paths that contain templates here, relative to this directory.\ntemplates_path = []\n\n# The suffix of source filenames.\nsource_suffix = '.rst'\n\n# The encoding of source files.\n#source_encoding = 'utf-8-sig'\n\n# The master toctree document.\nmaster_doc = 'index'\n\n# General information about the project.\nproject = u'Qtile'\ncopyright = u'2008-2018, Aldo Cortesi and contributers'\n\n# The version info for the project you're documenting, acts as replacement for\n# |version| and |release|, also used in various other places throughout the\n# built documents.\n#\n# The short X.Y version.\nversion = '0.13.0'\n# The full version, including alpha/beta/rc tags.\nrelease = version\n\n# The language for content autogenerated by Sphinx. Refer to documentation\n# for a list of supported languages.\n#language = None\n\n# There are two options for replacing |today|: either, you set today to some\n# non-false value, then it is used:\n#today = ''\n# Else, today_fmt is used as the format for a strftime call.\n#today_fmt = '%B %d, %Y'\n\n# List of patterns, relative to source directory, that match files and\n# directories to ignore when looking for source files.\nexclude_patterns = ['_build', 'man']\n\n# The reST default role (used for this markup: `text`) to use for all documents.\n#default_role = None\n\n# If true, '()' will be appended to :func: etc. cross-reference text.\n#add_function_parentheses = True\n\n# If true, the current module name will be prepended to all description\n# unit titles (such as .. function::).\n#add_module_names = True\n\n# If true, sectionauthor and moduleauthor directives will be shown in the\n# output. They are ignored by default.\n#show_authors = False\n\n# The name of the Pygments (syntax highlighting) style to use.\npygments_style = 'sphinx'\n\n# A list of ignored prefixes for module index sorting.\n#modindex_common_prefix = []\n\n# If true, `todo` and `todoList` produce output, else they produce nothing.\ntodo_include_todos = True\n\n\n# -- Options for HTML output --------fautod-------------------------------------------\n\n# The theme to use for HTML and HTML Help pages.  See the documentation for\n# a list of builtin themes.\n#html_theme = 'default'\n\n# Theme options are theme-specific and customize the look and feel of a theme\n# further.  For a list of options available for each theme, see the\n# documentation.\n#html_theme_options = {}\n\n# Add any paths that contain custom themes here, relative to this directory.\n#html_theme_path = []\n\n# The name for this set of Sphinx documents.  If None, it defaults to\n# \"<project> v<release> documentation\".\n#html_title = None\n\n# A shorter title for the navigation bar.  Default is the same as html_title.\n#html_short_title = None\n\n# The name of an image file (relative to this directory) to place at the top\n# of the sidebar.\n#html_logo = None\n\n# The name of an image file (within the static path) to use as favicon of the\n# docs.  This file should be a Windows icon file (.ico) being 16x16 or 32x32\n# pixels large.\nhtml_favicon = '_static/favicon.ico'\n\n# Add any paths that contain custom static files (such as style sheets) here,\n# relative to this directory. They are copied after the builtin static files,\n# so a file named \"default.css\" will overwrite the builtin \"default.css\".\nhtml_static_path = ['_static']\n\n# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,\n# using the given strftime format.\n#html_last_updated_fmt = '%b %d, %Y'\n\n# If true, SmartyPants will be used to convert quotes and dashes to\n# typographically correct entities.\n#html_use_smartypants = True\n\n# Custom sidebar templates, maps document names to template names.\n#html_sidebars = {}\n\n# Additional templates that should be rendered to pages, maps page names to\n# template names.\n#html_additional_pages = {'index': 'index.html'}\n\n# If false, no module index is generated.\n#html_domain_indices = True\n\n# If false, no index is generated.\nhtml_use_index = True\n\n# If true, the index is split into individual pages for each letter.\n#html_split_index = False\n\n# If true, links to the reST sources are added to the pages.\n#html_show_sourcelink = True\n\n# If true, \"Created using Sphinx\" is shown in the HTML footer. Default is True.\n#html_show_sphinx = True\n\n# If true, \"(C) Copyright ...\" is shown in the HTML footer. Default is True.\n#html_show_copyright = True\n\n# If true, an OpenSearch description file will be output, and all pages will\n# contain a <link> tag referring to it.  The value of this option must be the\n# base URL from which the finished HTML is served.\n#html_use_opensearch = ''\n\n# This is the file name suffix for HTML files (e.g. \".xhtml\").\n#html_file_suffix = None\n\n# Output file base name for HTML help builder.\nhtmlhelp_basename = 'Qtiledoc'\n\n\n# -- Options for LaTeX output --------------------------------------------------\n\nlatex_elements = {\n# The paper size ('letterpaper' or 'a4paper').\n#'papersize': 'letterpaper',\n\n# The font size ('10pt', '11pt' or '12pt').\n#'pointsize': '10pt',\n\n# Additional stuff for the LaTeX preamble.\n#'preamble': '',\n}\n\n# Grouping the document tree into LaTeX files. List of tuples\n# (source start file, target name, title, author, documentclass [howto/manual]).\nlatex_documents = [\n  ('index', 'Qtile.tex', u'Qtile Documentation',\n   u'Aldo Cortesi', 'manual'),\n]\n\n# The name of an image file (relative to this directory) to place at the top of\n# the title page.\n#latex_logo = None\n\n# For \"manual\" documents, if this is true, then toplevel headings are parts,\n# not chapters.\n#latex_use_parts = False\n\n# If true, show page references after internal links.\n#latex_show_pagerefs = False\n\n# If true, show URL addresses after external links.\n#latex_show_urls = False\n\n# Documents to append as an appendix to all manuals.\n#latex_appendices = []\n\n# If false, no module index is generated.\n#latex_domain_indices = True\n\n\n# -- Options for manual page output --------------------------------------------\n\n# One entry per manual page. List of tuples\n# (source start file, name, description, authors, manual section).\nman_pages = [\n    ('man/qtile', 'qtile', u'Qtile Documentation',\n     [u'Tycho Andersen'], 1),\n    ('man/qshell', 'qshell', u'Qtile Documentation',\n     [u'Tycho Andersen'], 1),\n]\n\n# If true, show URL addresses after external links.\n#man_show_urls = False\n\n\n# -- Options for Texinfo output ------------------------------------------------\n\n# Grouping the document tree into Texinfo files. List of tuples\n# (source start file, target name, title, author,\n#  dir menu entry, description, category)\ntexinfo_documents = [\n  ('index', 'Qtile', u'Qtile Documentation',\n   u'Aldo Cortesi', 'Qtile', 'A hackable tiling window manager.',\n   'Miscellaneous'),\n]\n\n# Documents to append as an appendix to all manuals.\n#texinfo_appendices = []\n\n# If false, no module index is generated.\n#texinfo_domain_indices = True\n\n# How to display URL addresses: 'footnote', 'no', or 'inline'.\n#texinfo_show_urls = 'footnote'\n\n# only import and set the theme if we're building docs locally\nif not os.environ.get('READTHEDOCS'):\n    import sphinx_rtd_theme\n    html_theme = 'sphinx_rtd_theme'\n    html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]\n\n\ngraphviz_dot_args = ['-Lg']\n\n# A workaround for the responsive tables always having annoying scrollbars.\ndef setup(app):\n    app.add_stylesheet(\"no_scrollbars.css\")\n", "path": "docs/conf.py"}], "after_files": [{"content": "# -*- coding: utf-8 -*-\n#\n# Qtile documentation build configuration file, created by\n# sphinx-quickstart on Sat Feb 11 15:20:21 2012.\n#\n# This file is execfile()d with the current directory set to its containing dir.\n#\n# Note that not all possible configuration values are present in this\n# autogenerated file.\n#\n# All configuration values have a default; values that are commented out\n# serve to show the default.\n\nimport os\nimport sys\nfrom unittest.mock import MagicMock\n\n\nclass Mock(MagicMock):\n    # xcbq does a dir() on objects and pull stuff out of them and tries to sort\n    # the result. MagicMock has a bunch of stuff that can't be sorted, so let's\n    # like about dir().\n    def __dir__(self):\n        return []\n\nMOCK_MODULES = [\n    'libqtile._ffi_pango',\n    'libqtile.core._ffi_xcursors',\n    'cairocffi',\n    'cairocffi.pixbuf',\n    'cffi',\n    'dateutil',\n    'dateutil.parser',\n    'dbus',\n    'dbus.mainloop.glib',\n    'iwlib',\n    'keyring',\n    'mpd',\n    'trollius',\n    'xcffib',\n    'xcffib.randr',\n    'xcffib.xfixes',\n    'xcffib.xinerama',\n    'xcffib.xproto',\n    'xdg.IconTheme',\n]\nsys.modules.update((mod_name, Mock()) for mod_name in MOCK_MODULES)\n\n# If extensions (or modules to document with autodoc) are in another directory,\n# add these directories to sys.path here. If the directory is relative to the\n# documentation root, use os.path.abspath to make it absolute, like shown here.\nsys.path.insert(0, os.path.abspath('.'))\nsys.path.insert(0, os.path.abspath('../'))\n\n# -- General configuration -----------------------------------------------------\n\n# If your documentation needs a minimal Sphinx version, state it here.\n#needs_sphinx = '1.0'\n\n# Add any Sphinx extension module names here, as strings. They can be extensions\n# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.\nextensions = [\n    'sphinx.ext.autodoc',\n    'sphinx.ext.autosummary',\n    'sphinx.ext.coverage',\n    'sphinx.ext.graphviz',\n    'sphinx.ext.todo',\n    'sphinx.ext.viewcode',\n    'sphinxcontrib.seqdiag',\n    'sphinx_qtile',\n    'numpydoc',\n]\n\nnumpydoc_show_class_members = False\n\n# Add any paths that contain templates here, relative to this directory.\ntemplates_path = []\n\n# The suffix of source filenames.\nsource_suffix = '.rst'\n\n# The encoding of source files.\n#source_encoding = 'utf-8-sig'\n\n# The master toctree document.\nmaster_doc = 'index'\n\n# General information about the project.\nproject = u'Qtile'\ncopyright = u'2008-2018, Aldo Cortesi and contributers'\n\n# The version info for the project you're documenting, acts as replacement for\n# |version| and |release|, also used in various other places throughout the\n# built documents.\n#\n# The short X.Y version.\nversion = '0.13.0'\n# The full version, including alpha/beta/rc tags.\nrelease = version\n\n# The language for content autogenerated by Sphinx. Refer to documentation\n# for a list of supported languages.\n#language = None\n\n# There are two options for replacing |today|: either, you set today to some\n# non-false value, then it is used:\n#today = ''\n# Else, today_fmt is used as the format for a strftime call.\n#today_fmt = '%B %d, %Y'\n\n# List of patterns, relative to source directory, that match files and\n# directories to ignore when looking for source files.\nexclude_patterns = ['_build', 'man']\n\n# The reST default role (used for this markup: `text`) to use for all documents.\n#default_role = None\n\n# If true, '()' will be appended to :func: etc. cross-reference text.\n#add_function_parentheses = True\n\n# If true, the current module name will be prepended to all description\n# unit titles (such as .. function::).\n#add_module_names = True\n\n# If true, sectionauthor and moduleauthor directives will be shown in the\n# output. They are ignored by default.\n#show_authors = False\n\n# The name of the Pygments (syntax highlighting) style to use.\npygments_style = 'sphinx'\n\n# A list of ignored prefixes for module index sorting.\n#modindex_common_prefix = []\n\n# If true, `todo` and `todoList` produce output, else they produce nothing.\ntodo_include_todos = True\n\n\n# -- Options for HTML output --------fautod-------------------------------------------\n\n# The theme to use for HTML and HTML Help pages.  See the documentation for\n# a list of builtin themes.\n#html_theme = 'default'\n\n# Theme options are theme-specific and customize the look and feel of a theme\n# further.  For a list of options available for each theme, see the\n# documentation.\n#html_theme_options = {}\n\n# Add any paths that contain custom themes here, relative to this directory.\n#html_theme_path = []\n\n# The name for this set of Sphinx documents.  If None, it defaults to\n# \"<project> v<release> documentation\".\n#html_title = None\n\n# A shorter title for the navigation bar.  Default is the same as html_title.\n#html_short_title = None\n\n# The name of an image file (relative to this directory) to place at the top\n# of the sidebar.\n#html_logo = None\n\n# The name of an image file (within the static path) to use as favicon of the\n# docs.  This file should be a Windows icon file (.ico) being 16x16 or 32x32\n# pixels large.\nhtml_favicon = '_static/favicon.ico'\n\n# Add any paths that contain custom static files (such as style sheets) here,\n# relative to this directory. They are copied after the builtin static files,\n# so a file named \"default.css\" will overwrite the builtin \"default.css\".\nhtml_static_path = ['_static']\n\n# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,\n# using the given strftime format.\n#html_last_updated_fmt = '%b %d, %Y'\n\n# If true, SmartyPants will be used to convert quotes and dashes to\n# typographically correct entities.\n#html_use_smartypants = True\n\n# Custom sidebar templates, maps document names to template names.\n#html_sidebars = {}\n\n# Additional templates that should be rendered to pages, maps page names to\n# template names.\n#html_additional_pages = {'index': 'index.html'}\n\n# If false, no module index is generated.\n#html_domain_indices = True\n\n# If false, no index is generated.\nhtml_use_index = True\n\n# If true, the index is split into individual pages for each letter.\n#html_split_index = False\n\n# If true, links to the reST sources are added to the pages.\n#html_show_sourcelink = True\n\n# If true, \"Created using Sphinx\" is shown in the HTML footer. Default is True.\n#html_show_sphinx = True\n\n# If true, \"(C) Copyright ...\" is shown in the HTML footer. Default is True.\n#html_show_copyright = True\n\n# If true, an OpenSearch description file will be output, and all pages will\n# contain a <link> tag referring to it.  The value of this option must be the\n# base URL from which the finished HTML is served.\n#html_use_opensearch = ''\n\n# This is the file name suffix for HTML files (e.g. \".xhtml\").\n#html_file_suffix = None\n\n# Output file base name for HTML help builder.\nhtmlhelp_basename = 'Qtiledoc'\n\n\n# -- Options for LaTeX output --------------------------------------------------\n\nlatex_elements = {\n# The paper size ('letterpaper' or 'a4paper').\n#'papersize': 'letterpaper',\n\n# The font size ('10pt', '11pt' or '12pt').\n#'pointsize': '10pt',\n\n# Additional stuff for the LaTeX preamble.\n#'preamble': '',\n}\n\n# Grouping the document tree into LaTeX files. List of tuples\n# (source start file, target name, title, author, documentclass [howto/manual]).\nlatex_documents = [\n  ('index', 'Qtile.tex', u'Qtile Documentation',\n   u'Aldo Cortesi', 'manual'),\n]\n\n# The name of an image file (relative to this directory) to place at the top of\n# the title page.\n#latex_logo = None\n\n# For \"manual\" documents, if this is true, then toplevel headings are parts,\n# not chapters.\n#latex_use_parts = False\n\n# If true, show page references after internal links.\n#latex_show_pagerefs = False\n\n# If true, show URL addresses after external links.\n#latex_show_urls = False\n\n# Documents to append as an appendix to all manuals.\n#latex_appendices = []\n\n# If false, no module index is generated.\n#latex_domain_indices = True\n\n\n# -- Options for manual page output --------------------------------------------\n\n# One entry per manual page. List of tuples\n# (source start file, name, description, authors, manual section).\nman_pages = [\n    ('man/qtile', 'qtile', u'Qtile Documentation',\n     [u'Tycho Andersen'], 1),\n    ('man/qshell', 'qshell', u'Qtile Documentation',\n     [u'Tycho Andersen'], 1),\n]\n\n# If true, show URL addresses after external links.\n#man_show_urls = False\n\n\n# -- Options for Texinfo output ------------------------------------------------\n\n# Grouping the document tree into Texinfo files. List of tuples\n# (source start file, target name, title, author,\n#  dir menu entry, description, category)\ntexinfo_documents = [\n  ('index', 'Qtile', u'Qtile Documentation',\n   u'Aldo Cortesi', 'Qtile', 'A hackable tiling window manager.',\n   'Miscellaneous'),\n]\n\n# Documents to append as an appendix to all manuals.\n#texinfo_appendices = []\n\n# If false, no module index is generated.\n#texinfo_domain_indices = True\n\n# How to display URL addresses: 'footnote', 'no', or 'inline'.\n#texinfo_show_urls = 'footnote'\n\n# only import and set the theme if we're building docs locally\nif not os.environ.get('READTHEDOCS'):\n    import sphinx_rtd_theme\n    html_theme = 'sphinx_rtd_theme'\n    html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]\n\n\ngraphviz_dot_args = ['-Lg']\n\n# A workaround for the responsive tables always having annoying scrollbars.\ndef setup(app):\n    app.add_stylesheet(\"no_scrollbars.css\")\n", "path": "docs/conf.py"}]}