Skip to content

Commit bedb851

Browse files
committed
Format code with black
1 parent 5c40b98 commit bedb851

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+4453
-3653
lines changed

docs/conf.py

+93-79
Original file line numberDiff line numberDiff line change
@@ -26,44 +26,44 @@
2626
# If extensions (or modules to document with autodoc) are in another directory,
2727
# add these directories to sys.path here. If the directory is relative to the
2828
# documentation root, use os.path.abspath to make it absolute, like shown here.
29-
sys.path.insert(0, os.path.abspath('..'))
30-
os.environ['DJANGO_SETTINGS_MODULE'] = 'example.settings'
29+
sys.path.insert(0, os.path.abspath(".."))
30+
os.environ["DJANGO_SETTINGS_MODULE"] = "example.settings"
3131
django.setup()
3232

3333
# Auto-generate API documentation.
34-
main(['-o', 'apidoc', '-f', '-e', '-T', '-M', '../rest_framework_json_api'])
34+
main(["-o", "apidoc", "-f", "-e", "-T", "-M", "../rest_framework_json_api"])
3535

3636
# -- General configuration ------------------------------------------------
3737

3838
# If your documentation needs a minimal Sphinx version, state it here.
39-
#needs_sphinx = '1.0'
39+
# needs_sphinx = '1.0'
4040

4141
# Add any Sphinx extension module names here, as strings. They can be
4242
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
4343
# ones.
44-
extensions = ['sphinx.ext.autodoc', 'recommonmark']
45-
autodoc_member_order = 'bysource'
44+
extensions = ["sphinx.ext.autodoc", "recommonmark"]
45+
autodoc_member_order = "bysource"
4646
autodoc_inherit_docstrings = False
4747

4848
# Add any paths that contain templates here, relative to this directory.
49-
templates_path = ['_templates']
49+
templates_path = ["_templates"]
5050

5151
# The suffix(es) of source filenames.
5252
# You can specify multiple suffix as a list of string:
5353
# source_suffix = ['.rst', '.md']
54-
source_suffix = ['.rst', '.md']
54+
source_suffix = [".rst", ".md"]
5555

5656
# The encoding of source files.
57-
#source_encoding = 'utf-8-sig'
57+
# source_encoding = 'utf-8-sig'
5858

5959
# The master toctree document.
60-
master_doc = 'index'
60+
master_doc = "index"
6161

6262
# General information about the project.
63-
project = 'Django REST Framework JSON API'
63+
project = "Django REST Framework JSON API"
6464
year = datetime.date.today().year
65-
copyright = '{}, Django REST Framework JSON API contributors'.format(year)
66-
author = 'Django REST Framework JSON API contributors'
65+
copyright = "{}, Django REST Framework JSON API contributors".format(year)
66+
author = "Django REST Framework JSON API contributors"
6767

6868
# The version info for the project you're documenting, acts as replacement for
6969
# |version| and |release|, also used in various other places throughout the
@@ -83,37 +83,37 @@
8383

8484
# There are two options for replacing |today|: either, you set today to some
8585
# non-false value, then it is used:
86-
#today = ''
86+
# today = ''
8787
# Else, today_fmt is used as the format for a strftime call.
88-
#today_fmt = '%B %d, %Y'
88+
# today_fmt = '%B %d, %Y'
8989

9090
# List of patterns, relative to source directory, that match files and
9191
# directories to ignore when looking for source files.
92-
exclude_patterns = ['_build', 'pull_request_template.md']
92+
exclude_patterns = ["_build", "pull_request_template.md"]
9393

9494
# The reST default role (used for this markup: `text`) to use for all
9595
# documents.
96-
#default_role = None
96+
# default_role = None
9797

9898
# If true, '()' will be appended to :func: etc. cross-reference text.
99-
#add_function_parentheses = True
99+
# add_function_parentheses = True
100100

101101
# If true, the current module name will be prepended to all description
102102
# unit titles (such as .. function::).
103-
#add_module_names = True
103+
# add_module_names = True
104104

105105
# If true, sectionauthor and moduleauthor directives will be shown in the
106106
# output. They are ignored by default.
107-
#show_authors = False
107+
# show_authors = False
108108

109109
# The name of the Pygments (syntax highlighting) style to use.
110-
pygments_style = 'default'
110+
pygments_style = "default"
111111

112112
# A list of ignored prefixes for module index sorting.
113-
#modindex_common_prefix = []
113+
# modindex_common_prefix = []
114114

115115
# If true, keep warnings as "system message" paragraphs in the built documents.
116-
#keep_warnings = False
116+
# keep_warnings = False
117117

118118
# If true, `todo` and `todoList` produce output, else they produce nothing.
119119
todo_include_todos = False
@@ -123,163 +123,171 @@
123123

124124
# The theme to use for HTML and HTML Help pages. See the documentation for
125125
# a list of builtin themes.
126-
html_theme = 'default'
126+
html_theme = "default"
127127

128-
on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
128+
on_rtd = os.environ.get("READTHEDOCS", None) == "True"
129129

130130
if not on_rtd: # only import and set the theme if we're building docs locally
131131
import sphinx_rtd_theme
132-
html_theme = 'sphinx_rtd_theme'
132+
133+
html_theme = "sphinx_rtd_theme"
133134
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
134135

135136
# Theme options are theme-specific and customize the look and feel of a theme
136137
# further. For a list of options available for each theme, see the
137138
# documentation.
138-
#html_theme_options = {}
139+
# html_theme_options = {}
139140

140141
# Add any paths that contain custom themes here, relative to this directory.
141-
#html_theme_path = []
142+
# html_theme_path = []
142143

143144
# The name for this set of Sphinx documents. If None, it defaults to
144145
# "<project> v<release> documentation".
145-
#html_title = None
146+
# html_title = None
146147

147148
# A shorter title for the navigation bar. Default is the same as html_title.
148-
#html_short_title = None
149+
# html_short_title = None
149150

150151
# The name of an image file (relative to this directory) to place at the top
151152
# of the sidebar.
152-
#html_logo = None
153+
# html_logo = None
153154

154155
# The name of an image file (within the static path) to use as favicon of the
155156
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
156157
# pixels large.
157-
#html_favicon = None
158+
# html_favicon = None
158159

159160
# Add any paths that contain custom static files (such as style sheets) here,
160161
# relative to this directory. They are copied after the builtin static files,
161162
# so a file named "default.css" will overwrite the builtin "default.css".
162-
html_static_path = ['_static']
163+
html_static_path = ["_static"]
163164

164165
# Add any extra paths that contain custom files (such as robots.txt or
165166
# .htaccess) here, relative to this directory. These files are copied
166167
# directly to the root of the documentation.
167-
#html_extra_path = []
168+
# html_extra_path = []
168169

169170
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
170171
# using the given strftime format.
171-
#html_last_updated_fmt = '%b %d, %Y'
172+
# html_last_updated_fmt = '%b %d, %Y'
172173

173174
# If true, SmartyPants will be used to convert quotes and dashes to
174175
# typographically correct entities.
175-
#html_use_smartypants = True
176+
# html_use_smartypants = True
176177

177178
# Custom sidebar templates, maps document names to template names.
178-
#html_sidebars = {}
179+
# html_sidebars = {}
179180

180181
# Additional templates that should be rendered to pages, maps page names to
181182
# template names.
182-
#html_additional_pages = {}
183+
# html_additional_pages = {}
183184

184185
# If false, no module index is generated.
185-
#html_domain_indices = True
186+
# html_domain_indices = True
186187

187188
# If false, no index is generated.
188-
#html_use_index = True
189+
# html_use_index = True
189190

190191
# If true, the index is split into individual pages for each letter.
191-
#html_split_index = False
192+
# html_split_index = False
192193

193194
# If true, links to the reST sources are added to the pages.
194-
#html_show_sourcelink = True
195+
# html_show_sourcelink = True
195196

196197
# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
197-
#html_show_sphinx = True
198+
# html_show_sphinx = True
198199

199200
# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
200-
#html_show_copyright = True
201+
# html_show_copyright = True
201202

202203
# If true, an OpenSearch description file will be output, and all pages will
203204
# contain a <link> tag referring to it. The value of this option must be the
204205
# base URL from which the finished HTML is served.
205-
#html_use_opensearch = ''
206+
# html_use_opensearch = ''
206207

207208
# This is the file name suffix for HTML files (e.g. ".xhtml").
208-
#html_file_suffix = None
209+
# html_file_suffix = None
209210

210211
# Language to be used for generating the HTML full-text search index.
211212
# Sphinx supports the following languages:
212213
# 'da', 'de', 'en', 'es', 'fi', 'fr', 'h', 'it', 'ja'
213214
# 'nl', 'no', 'pt', 'ro', 'r', 'sv', 'tr'
214-
#html_search_language = 'en'
215+
# html_search_language = 'en'
215216

216217
# A dictionary with options for the search language support, empty by default.
217218
# Now only 'ja' uses this config value
218-
#html_search_options = {'type': 'default'}
219+
# html_search_options = {'type': 'default'}
219220

220221
# The name of a javascript file (relative to the configuration directory) that
221222
# implements a search results scorer. If empty, the default will be used.
222-
#html_search_scorer = 'scorer.js'
223+
# html_search_scorer = 'scorer.js'
223224

224225
# Output file base name for HTML help builder.
225-
htmlhelp_basename = 'DjangoRESTFrameworkJSONAPIdoc'
226+
htmlhelp_basename = "DjangoRESTFrameworkJSONAPIdoc"
226227

227228
# -- Options for LaTeX output ---------------------------------------------
228229

229230
latex_elements = {
230-
# The paper size ('letterpaper' or 'a4paper').
231-
#'papersize': 'letterpaper',
232-
233-
# The font size ('10pt', '11pt' or '12pt').
234-
#'pointsize': '10pt',
235-
236-
# Additional stuff for the LaTeX preamble.
237-
#'preamble': '',
238-
239-
# Latex figure (float) alignment
240-
#'figure_align': 'htbp',
231+
# The paper size ('letterpaper' or 'a4paper').
232+
#'papersize': 'letterpaper',
233+
# The font size ('10pt', '11pt' or '12pt').
234+
#'pointsize': '10pt',
235+
# Additional stuff for the LaTeX preamble.
236+
#'preamble': '',
237+
# Latex figure (float) alignment
238+
#'figure_align': 'htbp',
241239
}
242240

243241
# Grouping the document tree into LaTeX files. List of tuples
244242
# (source start file, target name, title,
245243
# author, documentclass [howto, manual, or own class]).
246244
latex_documents = [
247-
(master_doc, 'DjangoRESTFrameworkJSONAPI.tex', 'Django REST Framework JSON API Documentation',
248-
'Django REST Framework JSON API contributors', 'manual'),
245+
(
246+
master_doc,
247+
"DjangoRESTFrameworkJSONAPI.tex",
248+
"Django REST Framework JSON API Documentation",
249+
"Django REST Framework JSON API contributors",
250+
"manual",
251+
),
249252
]
250253

251254
# The name of an image file (relative to this directory) to place at the top of
252255
# the title page.
253-
#latex_logo = None
256+
# latex_logo = None
254257

255258
# For "manual" documents, if this is true, then toplevel headings are parts,
256259
# not chapters.
257-
#latex_use_parts = False
260+
# latex_use_parts = False
258261

259262
# If true, show page references after internal links.
260-
#latex_show_pagerefs = False
263+
# latex_show_pagerefs = False
261264

262265
# If true, show URL addresses after external links.
263-
#latex_show_urls = False
266+
# latex_show_urls = False
264267

265268
# Documents to append as an appendix to all manuals.
266-
#latex_appendices = []
269+
# latex_appendices = []
267270

268271
# If false, no module index is generated.
269-
#latex_domain_indices = True
272+
# latex_domain_indices = True
270273

271274

272275
# -- Options for manual page output ---------------------------------------
273276

274277
# One entry per manual page. List of tuples
275278
# (source start file, name, description, authors, manual section).
276279
man_pages = [
277-
(master_doc, 'djangorestframeworkjsonapi', 'Django REST Framework JSON API Documentation',
278-
[author], 1)
280+
(
281+
master_doc,
282+
"djangorestframeworkjsonapi",
283+
"Django REST Framework JSON API Documentation",
284+
[author],
285+
1,
286+
)
279287
]
280288

281289
# If true, show URL addresses after external links.
282-
#man_show_urls = False
290+
# man_show_urls = False
283291

284292

285293
# -- Options for Texinfo output -------------------------------------------
@@ -288,19 +296,25 @@
288296
# (source start file, target name, title, author,
289297
# dir menu entry, description, category)
290298
texinfo_documents = [
291-
(master_doc, 'DjangoRESTFrameworkJSONAPI', 'Django REST Framework JSON API Documentation',
292-
author, 'DjangoRESTFrameworkJSONAPI', 'One line description of project.',
293-
'Miscellaneous'),
299+
(
300+
master_doc,
301+
"DjangoRESTFrameworkJSONAPI",
302+
"Django REST Framework JSON API Documentation",
303+
author,
304+
"DjangoRESTFrameworkJSONAPI",
305+
"One line description of project.",
306+
"Miscellaneous",
307+
),
294308
]
295309

296310
# Documents to append as an appendix to all manuals.
297-
#texinfo_appendices = []
311+
# texinfo_appendices = []
298312

299313
# If false, no module index is generated.
300-
#texinfo_domain_indices = True
314+
# texinfo_domain_indices = True
301315

302316
# How to display URL addresses: 'footnote', 'no', or 'inline'.
303-
#texinfo_show_urls = 'footnote'
317+
# texinfo_show_urls = 'footnote'
304318

305319
# If true, do not generate a @detailmenu in the "Top" node's menu.
306-
#texinfo_no_detailmenu = False
320+
# texinfo_no_detailmenu = False

0 commit comments

Comments
 (0)