Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit d8f26fc

Browse files
authored
Merge pull request #862 from sliverc/black
Format code with black (not squashing commits)
2 parents 1e2594f + 0146890 commit d8f26fc

File tree

75 files changed

+4477
-3664
lines changed

Some content is hidden

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

75 files changed

+4477
-3664
lines changed

‎.travis.yml‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ matrix:
1919
- env: TOXENV=py39-django31-drfmaster
2020

2121
include:
22+
- python: 3.6
23+
env: TOXENV=black
2224
- python: 3.6
2325
env: TOXENV=lint
2426
- python: 3.6

‎docs/conf.py‎

Lines changed: 93 additions & 80 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515

1616
import datetime
1717
import os
18-
import shlex
1918
import sys
2019

2120
import django
@@ -26,44 +25,44 @@
2625
# If extensions (or modules to document with autodoc) are in another directory,
2726
# add these directories to sys.path here. If the directory is relative to the
2827
# 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'
28+
sys.path.insert(0, os.path.abspath(".."))
29+
os.environ["DJANGO_SETTINGS_MODULE"] = "example.settings"
3130
django.setup()
3231

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

3635
# -- General configuration ------------------------------------------------
3736

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

4140
# Add any Sphinx extension module names here, as strings. They can be
4241
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
4342
# ones.
44-
extensions = ['sphinx.ext.autodoc', 'recommonmark']
45-
autodoc_member_order = 'bysource'
43+
extensions = ["sphinx.ext.autodoc", "recommonmark"]
44+
autodoc_member_order = "bysource"
4645
autodoc_inherit_docstrings = False
4746

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

5150
# The suffix(es) of source filenames.
5251
# You can specify multiple suffix as a list of string:
5352
# source_suffix = ['.rst', '.md']
54-
source_suffix = ['.rst', '.md']
53+
source_suffix = [".rst", ".md"]
5554

5655
# The encoding of source files.
57-
#source_encoding = 'utf-8-sig'
56+
#source_encoding = 'utf-8-sig'
5857

5958
# The master toctree document.
60-
master_doc = 'index'
59+
master_doc = "index"
6160

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

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

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

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

9493
# The reST default role (used for this markup: `text`) to use for all
9594
# documents.
96-
#default_role = None
95+
#default_role = None
9796

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

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

105104
# If true, sectionauthor and moduleauthor directives will be shown in the
106105
# output. They are ignored by default.
107-
#show_authors = False
106+
#show_authors = False
108107

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

112111
# A list of ignored prefixes for module index sorting.
113-
#modindex_common_prefix = []
112+
#modindex_common_prefix = []
114113

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

118117
# If true, `todo` and `todoList` produce output, else they produce nothing.
119118
todo_include_todos = False
@@ -123,163 +122,171 @@
123122

124123
# The theme to use for HTML and HTML Help pages. See the documentation for
125124
# a list of builtin themes.
126-
html_theme = 'default'
125+
html_theme = "default"
127126

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

130129
if not on_rtd: # only import and set the theme if we're building docs locally
131130
import sphinx_rtd_theme
132-
html_theme = 'sphinx_rtd_theme'
131+
132+
html_theme = "sphinx_rtd_theme"
133133
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
134134

135135
# Theme options are theme-specific and customize the look and feel of a theme
136136
# further. For a list of options available for each theme, see the
137137
# documentation.
138-
#html_theme_options = {}
138+
#html_theme_options = {}
139139

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

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

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

150150
# The name of an image file (relative to this directory) to place at the top
151151
# of the sidebar.
152-
#html_logo = None
152+
#html_logo = None
153153

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

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

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

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

173173
# If true, SmartyPants will be used to convert quotes and dashes to
174174
# typographically correct entities.
175-
#html_use_smartypants = True
175+
#html_use_smartypants = True
176176

177177
# Custom sidebar templates, maps document names to template names.
178-
#html_sidebars = {}
178+
#html_sidebars = {}
179179

180180
# Additional templates that should be rendered to pages, maps page names to
181181
# template names.
182-
#html_additional_pages = {}
182+
#html_additional_pages = {}
183183

184184
# If false, no module index is generated.
185-
#html_domain_indices = True
185+
#html_domain_indices = True
186186

187187
# If false, no index is generated.
188-
#html_use_index = True
188+
#html_use_index = True
189189

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

193193
# If true, links to the reST sources are added to the pages.
194-
#html_show_sourcelink = True
194+
#html_show_sourcelink = True
195195

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

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

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

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

210210
# Language to be used for generating the HTML full-text search index.
211211
# Sphinx supports the following languages:
212212
# 'da', 'de', 'en', 'es', 'fi', 'fr', 'h', 'it', 'ja'
213213
# 'nl', 'no', 'pt', 'ro', 'r', 'sv', 'tr'
214-
#html_search_language = 'en'
214+
#html_search_language = 'en'
215215

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

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

224224
# Output file base name for HTML help builder.
225-
htmlhelp_basename = 'DjangoRESTFrameworkJSONAPIdoc'
225+
htmlhelp_basename = "DjangoRESTFrameworkJSONAPIdoc"
226226

227227
# -- Options for LaTeX output ---------------------------------------------
228228

229229
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',
230+
# The paper size ('letterpaper' or 'a4paper').
231+
# 'papersize': 'letterpaper',
232+
# The font size ('10pt', '11pt' or '12pt').
233+
# 'pointsize': '10pt',
234+
# Additional stuff for the LaTeX preamble.
235+
# 'preamble': '',
236+
# Latex figure (float) alignment
237+
# 'figure_align': 'htbp',
241238
}
242239

243240
# Grouping the document tree into LaTeX files. List of tuples
244241
# (source start file, target name, title,
245242
# author, documentclass [howto, manual, or own class]).
246243
latex_documents = [
247-
(master_doc, 'DjangoRESTFrameworkJSONAPI.tex', 'Django REST Framework JSON API Documentation',
248-
'Django REST Framework JSON API contributors', 'manual'),
244+
(
245+
master_doc,
246+
"DjangoRESTFrameworkJSONAPI.tex",
247+
"Django REST Framework JSON API Documentation",
248+
"Django REST Framework JSON API contributors",
249+
"manual",
250+
),
249251
]
250252

251253
# The name of an image file (relative to this directory) to place at the top of
252254
# the title page.
253-
#latex_logo = None
255+
#latex_logo = None
254256

255257
# For "manual" documents, if this is true, then toplevel headings are parts,
256258
# not chapters.
257-
#latex_use_parts = False
259+
#latex_use_parts = False
258260

259261
# If true, show page references after internal links.
260-
#latex_show_pagerefs = False
262+
#latex_show_pagerefs = False
261263

262264
# If true, show URL addresses after external links.
263-
#latex_show_urls = False
265+
#latex_show_urls = False
264266

265267
# Documents to append as an appendix to all manuals.
266-
#latex_appendices = []
268+
#latex_appendices = []
267269

268270
# If false, no module index is generated.
269-
#latex_domain_indices = True
271+
#latex_domain_indices = True
270272

271273

272274
# -- Options for manual page output ---------------------------------------
273275

274276
# One entry per manual page. List of tuples
275277
# (source start file, name, description, authors, manual section).
276278
man_pages = [
277-
(master_doc, 'djangorestframeworkjsonapi', 'Django REST Framework JSON API Documentation',
278-
[author], 1)
279+
(
280+
master_doc,
281+
"djangorestframeworkjsonapi",
282+
"Django REST Framework JSON API Documentation",
283+
[author],
284+
1,
285+
)
279286
]
280287

281288
# If true, show URL addresses after external links.
282-
#man_show_urls = False
289+
#man_show_urls = False
283290

284291

285292
# -- Options for Texinfo output -------------------------------------------
@@ -288,19 +295,25 @@
288295
# (source start file, target name, title, author,
289296
# dir menu entry, description, category)
290297
texinfo_documents = [
291-
(master_doc, 'DjangoRESTFrameworkJSONAPI', 'Django REST Framework JSON API Documentation',
292-
author, 'DjangoRESTFrameworkJSONAPI', 'One line description of project.',
293-
'Miscellaneous'),
298+
(
299+
master_doc,
300+
"DjangoRESTFrameworkJSONAPI",
301+
"Django REST Framework JSON API Documentation",
302+
author,
303+
"DjangoRESTFrameworkJSONAPI",
304+
"One line description of project.",
305+
"Miscellaneous",
306+
),
294307
]
295308

296309
# Documents to append as an appendix to all manuals.
297-
#texinfo_appendices = []
310+
#texinfo_appendices = []
298311

299312
# If false, no module index is generated.
300-
#texinfo_domain_indices = True
313+
#texinfo_domain_indices = True
301314

302315
# How to display URL addresses: 'footnote', 'no', or 'inline'.
303-
#texinfo_show_urls = 'footnote'
316+
#texinfo_show_urls = 'footnote'
304317

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

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /