15
15
import sys
16
16
import os
17
17
18
+ import sane
19
+
18
20
# -- Mock module for _sane
19
21
try :
20
22
from unittest .mock import MagicMock
@@ -25,20 +27,24 @@ def __getattr__(cls, name):
25
27
return Mock ()
26
28
27
29
sys .modules .update ([('_sane' , Mock ())])
28
- except :
30
+ except Exception :
29
31
pass
30
32
31
33
32
34
# If extensions (or modules to document with autodoc) are in another directory,
33
35
# add these directories to sys.path here. If the directory is relative to the
34
36
# documentation root, use os.path.abspath to make it absolute, like shown here.
35
- libbuilddir = "lib.{p}-{v[0]}.{v[1]}" .format (p = sysconfig .get_platform (), v = sys .version_info )
36
- sys .path .insert (0 , os .path .join (os .path .abspath ('.' ), '..' , 'build' , libbuilddir ))
37
+ libbuilddir = "lib.{p}-{v[0]}.{v[1]}" .format (
38
+ p = sysconfig .get_platform (), v = sys .version_info
39
+ )
40
+ sys .path .insert (
41
+ 0 , os .path .join (os .path .abspath ('.' ), '..' , 'build' , libbuilddir )
42
+ )
37
43
38
44
# -- General configuration ------------------------------------------------
39
45
40
46
# If your documentation needs a minimal Sphinx version, state it here.
41
- #needs_sphinx = '1.0'
47
+ # needs_sphinx = '1.0'
42
48
43
49
# Add any Sphinx extension module names here, as strings. They can be
44
50
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
@@ -55,7 +61,7 @@ def __getattr__(cls, name):
55
61
source_suffix = '.rst'
56
62
57
63
# The encoding of source files.
58
- #source_encoding = 'utf-8-sig'
64
+ # source_encoding = 'utf-8-sig'
59
65
60
66
# The master toctree document.
61
67
master_doc = 'index'
@@ -68,49 +74,48 @@ def __getattr__(cls, name):
68
74
# |version| and |release|, also used in various other places throughout the
69
75
# built documents.
70
76
#
71
- import sane
72
77
# The short X.Y version.
73
78
version = sane .__version__
74
79
# The full version, including alpha/beta/rc tags.
75
80
release = sane .__version__
76
81
77
82
# The language for content autogenerated by Sphinx. Refer to documentation
78
83
# for a list of supported languages.
79
- #language = None
84
+ # language = None
80
85
81
86
# There are two options for replacing |today|: either, you set today to some
82
87
# non-false value, then it is used:
83
- #today = ''
88
+ # today = ''
84
89
# Else, today_fmt is used as the format for a strftime call.
85
- #today_fmt = '%B %d, %Y'
90
+ # today_fmt = '%B %d, %Y'
86
91
87
92
# List of patterns, relative to source directory, that match files and
88
93
# directories to ignore when looking for source files.
89
94
exclude_patterns = ['_build' ]
90
95
91
96
# The reST default role (used for this markup: `text`) to use for all
92
97
# documents.
93
- #default_role = None
98
+ # default_role = None
94
99
95
100
# If true, '()' will be appended to :func: etc. cross-reference text.
96
- #add_function_parentheses = True
101
+ # add_function_parentheses = True
97
102
98
103
# If true, the current module name will be prepended to all description
99
104
# unit titles (such as .. function::).
100
- #add_module_names = True
105
+ # add_module_names = True
101
106
102
107
# If true, sectionauthor and moduleauthor directives will be shown in the
103
108
# output. They are ignored by default.
104
- #show_authors = False
109
+ # show_authors = False
105
110
106
111
# The name of the Pygments (syntax highlighting) style to use.
107
112
pygments_style = 'sphinx'
108
113
109
114
# A list of ignored prefixes for module index sorting.
110
- #modindex_common_prefix = []
115
+ # modindex_common_prefix = []
111
116
112
117
# If true, keep warnings as "system message" paragraphs in the built documents.
113
- #keep_warnings = False
118
+ # keep_warnings = False
114
119
115
120
116
121
# -- Options for HTML output ----------------------------------------------
@@ -122,26 +127,26 @@ def __getattr__(cls, name):
122
127
# Theme options are theme-specific and customize the look and feel of a theme
123
128
# further. For a list of options available for each theme, see the
124
129
# documentation.
125
- #html_theme_options = {}
130
+ # html_theme_options = {}
126
131
127
132
# Add any paths that contain custom themes here, relative to this directory.
128
- #html_theme_path = []
133
+ # html_theme_path = []
129
134
130
135
# The name for this set of Sphinx documents. If None, it defaults to
131
136
# "<project> v<release> documentation".
132
- #html_title = None
137
+ # html_title = None
133
138
134
139
# A shorter title for the navigation bar. Default is the same as html_title.
135
- #html_short_title = None
140
+ # html_short_title = None
136
141
137
142
# The name of an image file (relative to this directory) to place at the top
138
143
# of the sidebar.
139
- #html_logo = None
144
+ # html_logo = None
140
145
141
146
# The name of an image file (within the static path) to use as favicon of the
142
147
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
143
148
# pixels large.
144
- #html_favicon = None
149
+ # html_favicon = None
145
150
146
151
# Add any paths that contain custom static files (such as style sheets) here,
147
152
# relative to this directory. They are copied after the builtin static files,
@@ -151,48 +156,48 @@ def __getattr__(cls, name):
151
156
# Add any extra paths that contain custom files (such as robots.txt or
152
157
# .htaccess) here, relative to this directory. These files are copied
153
158
# directly to the root of the documentation.
154
- #html_extra_path = []
159
+ # html_extra_path = []
155
160
156
161
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
157
162
# using the given strftime format.
158
- #html_last_updated_fmt = '%b %d, %Y'
163
+ # html_last_updated_fmt = '%b %d, %Y'
159
164
160
165
# If true, SmartyPants will be used to convert quotes and dashes to
161
166
# typographically correct entities.
162
- #html_use_smartypants = True
167
+ # html_use_smartypants = True
163
168
164
169
# Custom sidebar templates, maps document names to template names.
165
- #html_sidebars = {}
170
+ # html_sidebars = {}
166
171
167
172
# Additional templates that should be rendered to pages, maps page names to
168
173
# template names.
169
- #html_additional_pages = {}
174
+ # html_additional_pages = {}
170
175
171
176
# If false, no module index is generated.
172
- #html_domain_indices = True
177
+ # html_domain_indices = True
173
178
174
179
# If false, no index is generated.
175
- #html_use_index = True
180
+ # html_use_index = True
176
181
177
182
# If true, the index is split into individual pages for each letter.
178
- #html_split_index = False
183
+ # html_split_index = False
179
184
180
185
# If true, links to the reST sources are added to the pages.
181
- #html_show_sourcelink = True
186
+ # html_show_sourcelink = True
182
187
183
188
# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
184
- #html_show_sphinx = True
189
+ # html_show_sphinx = True
185
190
186
191
# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
187
- #html_show_copyright = True
192
+ # html_show_copyright = True
188
193
189
194
# If true, an OpenSearch description file will be output, and all pages will
190
195
# contain a <link> tag referring to it. The value of this option must be the
191
196
# base URL from which the finished HTML is served.
192
- #html_use_opensearch = ''
197
+ # html_use_opensearch = ''
193
198
194
199
# This is the file name suffix for HTML files (e.g. ".xhtml").
195
- #html_file_suffix = None
200
+ # html_file_suffix = None
196
201
197
202
# Output file base name for HTML help builder.
198
203
htmlhelp_basename = 'python-sanedoc'
@@ -201,14 +206,14 @@ def __getattr__(cls, name):
201
206
# -- Options for LaTeX output ---------------------------------------------
202
207
203
208
latex_elements = {
204
- # The paper size ('letterpaper' or 'a4paper').
205
- # 'papersize': 'letterpaper',
209
+ # The paper size ('letterpaper' or 'a4paper').
210
+ # 'papersize': 'letterpaper',
206
211
207
- # The font size ('10pt', '11pt' or '12pt').
208
- # 'pointsize': '10pt',
212
+ # The font size ('10pt', '11pt' or '12pt').
213
+ # 'pointsize': '10pt',
209
214
210
- # Additional stuff for the LaTeX preamble.
211
- # 'preamble': '',
215
+ # Additional stuff for the LaTeX preamble.
216
+ # 'preamble': '',
212
217
}
213
218
214
219
# Grouping the document tree into LaTeX files. List of tuples
@@ -221,23 +226,23 @@ def __getattr__(cls, name):
221
226
222
227
# The name of an image file (relative to this directory) to place at the top of
223
228
# the title page.
224
- #latex_logo = None
229
+ # latex_logo = None
225
230
226
231
# For "manual" documents, if this is true, then toplevel headings are parts,
227
232
# not chapters.
228
- #latex_use_parts = False
233
+ # latex_use_parts = False
229
234
230
235
# If true, show page references after internal links.
231
- #latex_show_pagerefs = False
236
+ # latex_show_pagerefs = False
232
237
233
238
# If true, show URL addresses after external links.
234
- #latex_show_urls = False
239
+ # latex_show_urls = False
235
240
236
241
# Documents to append as an appendix to all manuals.
237
- #latex_appendices = []
242
+ # latex_appendices = []
238
243
239
244
# If false, no module index is generated.
240
- #latex_domain_indices = True
245
+ # latex_domain_indices = True
241
246
242
247
243
248
# -- Options for manual page output ---------------------------------------
@@ -250,7 +255,7 @@ def __getattr__(cls, name):
250
255
]
251
256
252
257
# If true, show URL addresses after external links.
253
- #man_show_urls = False
258
+ # man_show_urls = False
254
259
255
260
256
261
# -- Options for Texinfo output -------------------------------------------
@@ -261,18 +266,19 @@ def __getattr__(cls, name):
261
266
texinfo_documents = [
262
267
('index' , 'python-sane' , 'python-sane Documentation' ,
263
268
'Andrew Kuchling, Ralph Heinkel, Sandro Mani' , 'python-sane' ,
264
- 'Provides an interface to the SANE scanner and frame grabber interface for Linux' ,
269
+ 'Provides an interface to the SANE scanner and frame grabber interface for'
270
+ ' Linux' ,
265
271
'Miscellaneous' ),
266
272
]
267
273
268
274
# Documents to append as an appendix to all manuals.
269
- #texinfo_appendices = []
275
+ # texinfo_appendices = []
270
276
271
277
# If false, no module index is generated.
272
- #texinfo_domain_indices = True
278
+ # texinfo_domain_indices = True
273
279
274
280
# How to display URL addresses: 'footnote', 'no', or 'inline'.
275
- #texinfo_show_urls = 'footnote'
281
+ # texinfo_show_urls = 'footnote'
276
282
277
283
# If true, do not generate a @detailmenu in the "Top" node's menu.
278
- #texinfo_no_detailmenu = False
284
+ # texinfo_no_detailmenu = False
0 commit comments