summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorJarrod Millman <jarrod.millman@gmail.com>2022-05-07 19:39:02 -0700
committerJarrod Millman <jarrod.millman@gmail.com>2022-05-07 19:43:09 -0700
commit4b38c01e680cf2032acb09819bc0985e5dfc5ca8 (patch)
tree7406d44c4f64d6299526bb3348ad02307ccf572a /doc
parent90c785975a65f064eb3bef40f9a50b8edd5af102 (diff)
downloadnumpydoc-4b38c01e680cf2032acb09819bc0985e5dfc5ca8.tar.gz
Run black formatter
Diffstat (limited to 'doc')
-rw-r--r--doc/conf.py62
-rw-r--r--doc/example.py2
2 files changed, 34 insertions, 30 deletions
diff --git a/doc/conf.py b/doc/conf.py
index 28708d8..16e1ac3 100644
--- a/doc/conf.py
+++ b/doc/conf.py
@@ -21,11 +21,11 @@ import os
# documentation root, use os.path.abspath to make it absolute, like shown here.
# for example.py
-sys.path.insert(0, os.path.abspath('.'))
+sys.path.insert(0, os.path.abspath("."))
# project root
-sys.path.insert(0, os.path.abspath('..'))
+sys.path.insert(0, os.path.abspath(".."))
-os.environ['MPLBACKEND'] = 'Agg' # avoid tkinter import errors on rtfd.io
+os.environ["MPLBACKEND"] = "Agg" # avoid tkinter import errors on rtfd.io
# -- General configuration ---------------------------------------------------
@@ -36,32 +36,32 @@ os.environ['MPLBACKEND'] = 'Agg' # avoid tkinter import errors on rtfd.io
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
- 'sphinx.ext.autodoc',
- 'sphinx.ext.autosummary',
- 'sphinx.ext.doctest',
- 'sphinx.ext.intersphinx',
- 'sphinx.ext.todo',
- 'numpydoc',
- 'sphinx.ext.ifconfig',
- 'sphinx.ext.viewcode',
- 'sphinx.ext.imgmath',
+ "sphinx.ext.autodoc",
+ "sphinx.ext.autosummary",
+ "sphinx.ext.doctest",
+ "sphinx.ext.intersphinx",
+ "sphinx.ext.todo",
+ "numpydoc",
+ "sphinx.ext.ifconfig",
+ "sphinx.ext.viewcode",
+ "sphinx.ext.imgmath",
]
# Add any paths that contain templates here, relative to this directory.
-templates_path = ['_templates']
+templates_path = ["_templates"]
# The suffix of source filenames.
-source_suffix = '.rst'
+source_suffix = ".rst"
# The encoding of source files.
# source_encoding = 'utf-8-sig'
# The root toctree document
-master_doc = 'index' # NOTE: will be changed to `root_doc` in sphinx 4
+master_doc = "index" # NOTE: will be changed to `root_doc` in sphinx 4
# General information about the project.
-project = 'numpydoc'
-copyright = f'2019-{date.today().year}, numpydoc maintainers'
+project = "numpydoc"
+copyright = f"2019-{date.today().year}, numpydoc maintainers"
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
@@ -70,12 +70,13 @@ copyright = f'2019-{date.today().year}, numpydoc maintainers'
# The short X.Y version.
import numpydoc
+
# version = .__version__
# The full version, including alpha/beta/rc tags.
release = numpydoc.__version__
version = numpydoc.__version__
numpydoc_xref_param_type = True
-numpydoc_xref_ignore = {'optional', 'type_without_description', 'BadException'}
+numpydoc_xref_ignore = {"optional", "type_without_description", "BadException"}
# Run docstring validation as part of build process
numpydoc_validation_checks = {"all", "GL01", "SA04", "RT03"}
@@ -91,7 +92,7 @@ numpydoc_validation_checks = {"all", "GL01", "SA04", "RT03"}
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
-exclude_patterns = ['_build']
+exclude_patterns = ["_build"]
# The reST default role (used for this markup: `text`) to use for all
# documents.
@@ -109,7 +110,7 @@ exclude_patterns = ['_build']
# show_authors = False
# The name of the Pygments (syntax highlighting) style to use.
-pygments_style = 'sphinx'
+pygments_style = "sphinx"
# A list of ignored prefixes for module index sorting.
# modindex_common_prefix = []
@@ -134,7 +135,7 @@ html_sidebars = {
}
html_title = f"{project} v{version} Manual"
-html_last_updated_fmt = '%b %d, %Y'
+html_last_updated_fmt = "%b %d, %Y"
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
@@ -188,7 +189,7 @@ html_static_path = [] # ['_static']
# html_file_suffix = None
# Output file base name for HTML help builder.
-htmlhelp_basename = 'project-templatedoc'
+htmlhelp_basename = "project-templatedoc"
# -- Options for LaTeX output ---------------------------------------------
@@ -196,10 +197,8 @@ htmlhelp_basename = 'project-templatedoc'
latex_elements = {
# The paper size ('letterpaper' or 'a4paper').
# 'papersize': 'letterpaper',
-
# The font size ('10pt', '11pt' or '12pt').
# 'pointsize': '10pt',
-
# Additional stuff for the LaTeX preamble.
# 'preamble': '',
}
@@ -208,8 +207,13 @@ latex_elements = {
# (source start file, target name, title,
# author, documentclass [howto, manual, or own class]).
latex_documents = [
- ('index', 'numpydoc.tex', 'numpydoc Documentation',
- 'Numpydoc maintainers', 'manual'),
+ (
+ "index",
+ "numpydoc.tex",
+ "numpydoc Documentation",
+ "Numpydoc maintainers",
+ "manual",
+ ),
]
# The name of an image file (relative to this directory) to place at the top of
@@ -247,7 +251,7 @@ latex_documents = [
# Example configuration for intersphinx: refer to the Python standard library.
intersphinx_mapping = {
- 'python': ('https://docs.python.org/3/', None),
- 'numpy': ('https://numpy.org/devdocs/', None),
- 'sklearn': ('https://scikit-learn.org/stable/', None),
+ "python": ("https://docs.python.org/3/", None),
+ "numpy": ("https://numpy.org/devdocs/", None),
+ "sklearn": ("https://scikit-learn.org/stable/", None),
}
diff --git a/doc/example.py b/doc/example.py
index 3e93a82..9d3ecca 100644
--- a/doc/example.py
+++ b/doc/example.py
@@ -34,7 +34,7 @@ import matplotlib.pyplot as plt
# numpy module itself, unabbreviated.
-def foo(var1, var2, *args, long_var_name='hi', only_seldom_used_keyword=0, **kwargs):
+def foo(var1, var2, *args, long_var_name="hi", only_seldom_used_keyword=0, **kwargs):
r"""Summarize the function in one line.
Several sentences providing an extended description. Refer to