@@ -64,7 +64,7 @@ def process_docstring(app, what, name, obj, options, lines):
6464 for field in fields :
6565 # Skip ManyToOneRel and ManyToManyRel fields
6666 # which have no 'verbose_name' or 'help_text'
67- if not hasattr (field , ' verbose_name' ):
67+ if not hasattr (field , " verbose_name" ):
6868 continue
6969
7070 # Decode and strip any html out of the field's help text
@@ -77,24 +77,20 @@ def process_docstring(app, what, name, obj, options, lines):
7777 if help_text :
7878 # Add the model field to the end of the docstring as a param
7979 # using the help text as the description
80- lines .append (u' :param %s: %s' % (field .attname , help_text ))
80+ lines .append (" :param %s: %s" % (field .attname , help_text ))
8181 else :
8282 # Add the model field to the end of the docstring as a param
8383 # using the verbose name as the description
84- lines .append (u' :param %s: %s' % (field .attname , verbose_name ))
84+ lines .append (" :param %s: %s" % (field .attname , verbose_name ))
8585
8686 # Add the field's type to the docstring
8787 if isinstance (field , models .ForeignKey ):
8888 to = field .remote_field .model
8989 lines .append (
90- u':type %s: %s to :class:`~%s`'
91- % (field .attname , type (field ).__name__ , to )
90+ ":type %s: %s to :class:`~%s`" % (field .attname , type (field ).__name__ , to )
9291 )
9392 else :
94- lines .append (
95- u':type %s: %s'
96- % (field .attname , type (field ).__name__ )
97- )
93+ lines .append (":type %s: %s" % (field .attname , type (field ).__name__ ))
9894
9995 return lines
10096
@@ -106,18 +102,18 @@ def process_docstring(app, what, name, obj, options, lines):
106102extensions = ["sphinx.ext.autodoc" , "sphinx.ext.viewcode" ]
107103
108104# Add any paths that contain templates here, relative to this directory.
109- templates_path = [' _templates' ]
105+ templates_path = [" _templates" ]
110106
111107# The suffix(es) of source filenames.
112108# You can specify multiple suffix as a list of string:
113109source_suffix = [".rst" ]
114110
115111# The master toctree document.
116- master_doc = ' index'
112+ master_doc = " index"
117113
118114# General information about the project.
119- project = u "Morango developer documentation"
120- copyright = u "2020 Learning Equality"
115+ project = "Morango developer documentation"
116+ copyright = "2020 Learning Equality"
121117
122118# The version info for the project you're documenting, acts as replacement
123119# for |version| and |release|, also used in various other places throughout
@@ -140,7 +136,7 @@ def process_docstring(app, what, name, obj, options, lines):
140136
141137# List of patterns, relative to source directory, that match files and
142138# directories to ignore when looking for source files.
143- exclude_patterns = [' _build' ]
139+ exclude_patterns = [" _build" ]
144140
145141# The reST default role (used for this markup: `text`) to use for all
146142# documents.
@@ -158,7 +154,7 @@ def process_docstring(app, what, name, obj, options, lines):
158154# show_authors = False
159155
160156# The name of the Pygments (syntax highlighting) style to use.
161- pygments_style = ' sphinx'
157+ pygments_style = " sphinx"
162158
163159# A list of ignored prefixes for module index sorting.
164160# modindex_common_prefix = []
@@ -257,18 +253,16 @@ def setup(app):
257253# html_file_suffix = None
258254
259255# Output file base name for HTML help builder.
260- htmlhelp_basename = ' morangodoc'
256+ htmlhelp_basename = " morangodoc"
261257
262258
263259# -- Options for LaTeX output ------------------------------------------
264260
265261latex_elements = {
266262 # The paper size ('letterpaper' or 'a4paper').
267263 # 'papersize': 'letterpaper',
268-
269264 # The font size ('10pt', '11pt' or '12pt').
270265 # 'pointsize': '10pt',
271-
272266 # Additional stuff for the LaTeX preamble.
273267 # 'preamble': '',
274268}
@@ -277,9 +271,7 @@ def setup(app):
277271# (source start file, target name, title, author, documentclass
278272# [howto/manual]).
279273latex_documents = [
280- ('index' , 'morango.tex' ,
281- u'morango Documentation' ,
282- u'Learning Equality' , 'manual' ),
274+ ("index" , "morango.tex" , "morango Documentation" , "Learning Equality" , "manual" ),
283275]
284276
285277# The name of an image file (relative to this directory) to place at
@@ -307,11 +299,7 @@ def setup(app):
307299
308300# One entry per manual page. List of tuples
309301# (source start file, name, description, authors, manual section).
310- man_pages = [
311- ('index' , 'morango' ,
312- u'morango Documentation' ,
313- [u'Learning Equality' ], 1 )
314- ]
302+ man_pages = [("index" , "morango" , "morango Documentation" , ["Learning Equality" ], 1 )]
315303
316304# If true, show URL addresses after external links.
317305# man_show_urls = False
@@ -346,4 +334,4 @@ def setup(app):
346334# If true, do not generate a @detailmenu in the "Top" node's menu.
347335# texinfo_no_detailmenu = False
348336
349- suppress_warnings = [' image.nonlocal_uri' ]
337+ suppress_warnings = [" image.nonlocal_uri" ]
0 commit comments