Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 7fc683d

Browse files
committed
Cleanup
1 parent 80850f5 commit 7fc683d

File tree

7 files changed

+4
-303
lines changed

7 files changed

+4
-303
lines changed

docs/conf.py

Lines changed: 0 additions & 282 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,8 @@
11
#!/usr/bin/env python3
22
# -*- coding: utf-8 -*-
33
#
4-
# sphinx-automodapi documentation build configuration file, created by
5-
# sphinx-quickstart on Sun Nov 6 14:35:17 2016.
6-
#
7-
# This file is execfile()d with the current directory set to its
8-
# containing dir.
9-
#
10-
# Note that not all possible configuration values are present in this
11-
# autogenerated file.
12-
#
13-
# All configuration values have a default; values that are commented out
14-
# serve to show the default.
15-
16-
# If extensions (or modules to document with autodoc) are in another directory,
17-
# add these directories to sys.path here. If the directory is relative to the
18-
# documentation root, use os.path.abspath to make it absolute, like shown here.
19-
#
20-
# import os
21-
# import sys
22-
# sys.path.insert(0, os.path.abspath('.'))
23-
244
# -- General configuration ------------------------------------------------
255

26-
# If your documentation needs a minimal Sphinx version, state it here.
27-
#
28-
# needs_sphinx = '1.0'
29-
306
# Add any Sphinx extension module names here, as strings. They can be
317
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
328
# ones.
@@ -39,14 +15,8 @@
3915

4016
# The suffix(es) of source filenames.
4117
# You can specify multiple suffix as a list of string:
42-
#
43-
# source_suffix = ['.rst', '.md']
4418
source_suffix = '.rst'
4519

46-
# The encoding of source files.
47-
#
48-
# source_encoding = 'utf-8-sig'
49-
5020
# The master toctree document.
5121
master_doc = 'index'
5222

@@ -71,273 +41,21 @@
7141
# Usually you set "language" from the command line for these cases.
7242
language = None
7343

74-
# There are two options for replacing |today|: either, you set today to some
75-
# non-false value, then it is used:
76-
#
77-
# today = ''
78-
#
79-
# Else, today_fmt is used as the format for a strftime call.
80-
#
81-
# today_fmt = '%B %d, %Y'
82-
8344
# List of patterns, relative to source directory, that match files and
8445
# directories to ignore when looking for source files.
8546
# This patterns also effect to html_static_path and html_extra_path
8647
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
8748

88-
# The reST default role (used for this markup: `text`) to use for all
89-
# documents.
90-
#
91-
# default_role = None
92-
93-
# If true, '()' will be appended to :func: etc. cross-reference text.
94-
#
95-
# add_function_parentheses = True
96-
97-
# If true, the current module name will be prepended to all description
98-
# unit titles (such as .. function::).
99-
#
100-
# add_module_names = True
101-
102-
# If true, sectionauthor and moduleauthor directives will be shown in the
103-
# output. They are ignored by default.
104-
#
105-
# show_authors = False
106-
10749
# The name of the Pygments (syntax highlighting) style to use.
10850
pygments_style = 'sphinx'
10951

110-
# A list of ignored prefixes for module index sorting.
111-
# modindex_common_prefix = []
112-
113-
# If true, keep warnings as "system message" paragraphs in the built documents.
114-
# keep_warnings = False
115-
116-
# If true, `todo` and `todoList` produce output, else they produce nothing.
117-
todo_include_todos = False
118-
119-
12052
# -- Options for HTML output ----------------------------------------------
12153

12254
# The theme to use for HTML and HTML Help pages. See the documentation for
12355
# a list of builtin themes.
124-
#
12556
html_theme = 'alabaster'
12657

127-
# Theme options are theme-specific and customize the look and feel of a theme
128-
# further. For a list of options available for each theme, see the
129-
# documentation.
130-
#
131-
# html_theme_options = {}
132-
133-
# Add any paths that contain custom themes here, relative to this directory.
134-
# html_theme_path = []
135-
136-
# The name for this set of Sphinx documents.
137-
# "<project> v<release> documentation" by default.
138-
#
139-
# html_title = 'sphinx-automodapi v0.1.dev'
140-
141-
# A shorter title for the navigation bar. Default is the same as html_title.
142-
#
143-
# html_short_title = None
144-
145-
# The name of an image file (relative to this directory) to place at the top
146-
# of the sidebar.
147-
#
148-
# html_logo = None
149-
150-
# The name of an image file (relative to this directory) to use as a favicon of
151-
# the docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
152-
# pixels large.
153-
#
154-
# html_favicon = None
155-
156-
# Add any paths that contain custom static files (such as style sheets) here,
157-
# relative to this directory. They are copied after the builtin static files,
158-
# so a file named "default.css" will overwrite the builtin "default.css".
159-
# html_static_path = ['_static']
160-
161-
# Add any extra paths that contain custom files (such as robots.txt or
162-
# .htaccess) here, relative to this directory. These files are copied
163-
# directly to the root of the documentation.
164-
#
165-
# html_extra_path = []
166-
167-
# If not None, a 'Last updated on:' timestamp is inserted at every page
168-
# bottom, using the given strftime format.
169-
# The empty string is equivalent to '%b %d, %Y'.
170-
#
171-
# html_last_updated_fmt = None
172-
173-
# If true, SmartyPants will be used to convert quotes and dashes to
174-
# typographically correct entities.
175-
#
176-
# html_use_smartypants = True
177-
178-
# Custom sidebar templates, maps document names to template names.
179-
#
180-
# html_sidebars = {}
181-
182-
# Additional templates that should be rendered to pages, maps page names to
183-
# template names.
184-
#
185-
# html_additional_pages = {}
186-
187-
# If false, no module index is generated.
188-
#
189-
# html_domain_indices = True
190-
191-
# If false, no index is generated.
192-
#
193-
# html_use_index = True
194-
195-
# If true, the index is split into individual pages for each letter.
196-
#
197-
# html_split_index = False
198-
199-
# If true, links to the reST sources are added to the pages.
200-
#
201-
# html_show_sourcelink = True
202-
203-
# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
204-
#
205-
# html_show_sphinx = True
206-
207-
# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
208-
#
209-
# html_show_copyright = True
210-
211-
# If true, an OpenSearch description file will be output, and all pages will
212-
# contain a <link> tag referring to it. The value of this option must be the
213-
# base URL from which the finished HTML is served.
214-
#
215-
# html_use_opensearch = ''
216-
217-
# This is the file name suffix for HTML files (e.g. ".xhtml").
218-
# html_file_suffix = None
219-
220-
# Language to be used for generating the HTML full-text search index.
221-
# Sphinx supports the following languages:
222-
# 'da', 'de', 'en', 'es', 'fi', 'fr', 'h', 'it', 'ja'
223-
# 'nl', 'no', 'pt', 'ro', 'r', 'sv', 'tr', 'zh'
224-
#
225-
# html_search_language = 'en'
226-
227-
# A dictionary with options for the search language support, empty by default.
228-
# 'ja' uses this config value.
229-
# 'zh' user can custom change `jieba` dictionary path.
230-
#
231-
# html_search_options = {'type': 'default'}
232-
233-
# The name of a javascript file (relative to the configuration directory) that
234-
# implements a search results scorer. If empty, the default will be used.
235-
#
236-
# html_search_scorer = 'scorer.js'
237-
23858
# Output file base name for HTML help builder.
23959
htmlhelp_basename = 'sphinx-automodapidoc'
24060

241-
# -- Options for LaTeX output ---------------------------------------------
242-
243-
latex_elements = {
244-
# The paper size ('letterpaper' or 'a4paper').
245-
#
246-
# 'papersize': 'letterpaper',
247-
248-
# The font size ('10pt', '11pt' or '12pt').
249-
#
250-
# 'pointsize': '10pt',
251-
252-
# Additional stuff for the LaTeX preamble.
253-
#
254-
# 'preamble': '',
255-
256-
# Latex figure (float) alignment
257-
#
258-
# 'figure_align': 'htbp',
259-
}
260-
261-
# Grouping the document tree into LaTeX files. List of tuples
262-
# (source start file, target name, title,
263-
# author, documentclass [howto, manual, or own class]).
264-
latex_documents = [
265-
(master_doc, 'sphinx-automodapi.tex', 'sphinx-automodapi Documentation',
266-
'The Astropy Developers', 'manual'),
267-
]
268-
269-
# The name of an image file (relative to this directory) to place at the top of
270-
# the title page.
271-
#
272-
# latex_logo = None
273-
274-
# For "manual" documents, if this is true, then toplevel headings are parts,
275-
# not chapters.
276-
#
277-
# latex_use_parts = False
278-
279-
# If true, show page references after internal links.
280-
#
281-
# latex_show_pagerefs = False
282-
283-
# If true, show URL addresses after external links.
284-
#
285-
# latex_show_urls = False
286-
287-
# Documents to append as an appendix to all manuals.
288-
#
289-
# latex_appendices = []
290-
291-
# It false, will not define \strong, \code, itleref, \crossref ... but only
292-
# \sphinxstrong, ..., \sphinxtitleref, ... To help avoid clash with user added
293-
# packages.
294-
#
295-
# latex_keep_old_macro_names = True
296-
297-
# If false, no module index is generated.
298-
#
299-
# latex_domain_indices = True
300-
301-
302-
# -- Options for manual page output ---------------------------------------
303-
304-
# One entry per manual page. List of tuples
305-
# (source start file, name, description, authors, manual section).
306-
man_pages = [
307-
(master_doc, 'sphinx-automodapi', 'sphinx-automodapi Documentation',
308-
[author], 1)
309-
]
310-
311-
# If true, show URL addresses after external links.
312-
#
313-
# man_show_urls = False
314-
315-
316-
# -- Options for Texinfo output -------------------------------------------
317-
318-
# Grouping the document tree into Texinfo files. List of tuples
319-
# (source start file, target name, title, author,
320-
# dir menu entry, description, category)
321-
texinfo_documents = [
322-
(master_doc, 'sphinx-automodapi', 'sphinx-automodapi Documentation',
323-
author, 'sphinx-automodapi', 'One line description of project.',
324-
'Miscellaneous'),
325-
]
326-
327-
# Documents to append as an appendix to all manuals.
328-
#
329-
# texinfo_appendices = []
330-
331-
# If false, no module index is generated.
332-
#
333-
# texinfo_domain_indices = True
334-
335-
# How to display URL addresses: 'footnote', 'no', or 'inline'.
336-
#
337-
# texinfo_show_urls = 'footnote'
338-
339-
# If true, do not generate a @detailmenu in the "Top" node's menu.
340-
#
341-
# texinfo_no_detailmenu = False
342-
34361
nitpicky = True

sphinx_automodapi/autodoc_enhancements.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ def setup(app):
9797

9898
app.add_autodoc_attrgetter(type, type_object_attrgetter)
9999

100-
if sphinx.version_info < (1,4,2):
100+
if sphinx.version_info < (1, 4, 2):
101101
# this is a really ugly hack to supress a warning that sphinx 1.4
102102
# generates when overriding an existing directive (which is *desired*
103103
# behavior here). As of sphinx v1.4.2, this has been fixed:

sphinx_automodapi/automodapi.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ def automodapi_replace(sourcestr, app, dotoctree=True, docname=None,
270270
modhds=h1 * len(modnm),
271271
pkgormod='Package' if ispkg else 'Module',
272272
pkgormodhds=h1 * (8 if ispkg else 7),
273-
automoduleline=automodline))
273+
automoduleline=automodline)) # noqa
274274
else:
275275
newstrs.append(automod_templ_modheader.format(
276276
modname='',

sphinx_automodapi/automodsumm.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -606,7 +606,6 @@ def get_members_class(obj, typ, include_public=[],
606606
f.close()
607607

608608

609-
610609
def setup(app):
611610

612611
# need autodoc fixes

sphinx_automodapi/tests/test_automodapi.py

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
11
# Licensed under a 3-clause BSD style license - see LICENSE.rst
22

3-
import os
4-
import sys
5-
63
import pytest
74

8-
from . import *
95
from ..utils import iteritems
106

117
pytest.importorskip('sphinx') # skips these tests if sphinx not present
@@ -26,10 +22,8 @@ class FakeApp(object):
2622
"""
2723

2824
# Some default config values
29-
_defaults = {
30-
'automodapi_toctreedirnm': 'api',
31-
'automodapi_writereprocessed': False
32-
}
25+
_defaults = {'automodapi_toctreedirnm': 'api',
26+
'automodapi_writereprocessed': False}
3327

3428
def __init__(self, **configs):
3529
config = self._defaults.copy()

sphinx_automodapi/tests/test_automodsumm.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
# Licensed under a 3-clause BSD style license - see LICENSE.rst
22

3-
import sys
4-
53
import pytest
64

7-
from . import *
85
from ..utils import iteritems
96

107
pytest.importorskip('sphinx') # skips these tests if sphinx not present

0 commit comments

Comments
 (0)