summaryrefslogtreecommitdiff
path: root/docs/conf.py
diff options
context:
space:
mode:
authorxNinjaKittyx <xNinjaKittyx@users.noreply.github.com>2020-12-15 17:21:33 -0800
committerxNinjaKittyx <xNinjaKittyx@users.noreply.github.com>2020-12-15 18:20:13 -0800
commit9aa54a5b27468d61337528cb1e1b5b9b11a80978 (patch)
tree567693115cc101efb9254a96d96d80e9f9ccd557 /docs/conf.py
parent03c65c60b39e369958b056c5c844d36d515c8a63 (diff)
downloadcmd2-git-ci_improvements.tar.gz
Adds pre-commit config to run various lintersci_improvements
This ads black, isort, pyupgrade, and flake8 to pre-commit-config.yaml There are also some small changes to travis.yml and tasks.py to reduce some repeated configurations that should be consolidated into setup.cfg. Most other changes are automated by the linter scripts.
Diffstat (limited to 'docs/conf.py')
-rw-r--r--docs/conf.py39
1 files changed, 19 insertions, 20 deletions
diff --git a/docs/conf.py b/docs/conf.py
index 9396f000..9ad7b0da 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -30,11 +30,13 @@ import cmd2
# Add any Sphinx extension module names here, as strings. They can be extensions
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
-extensions = ['sphinx.ext.autodoc',
- 'sphinx.ext.autosectionlabel',
- 'sphinx.ext.intersphinx',
- 'sphinx.ext.doctest',
- 'sphinx.ext.todo']
+extensions = [
+ 'sphinx.ext.autodoc',
+ 'sphinx.ext.autosectionlabel',
+ 'sphinx.ext.intersphinx',
+ 'sphinx.ext.doctest',
+ 'sphinx.ext.todo',
+]
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
@@ -116,15 +118,12 @@ 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': '',
-
# Latex figure (float) alignment
#
# 'figure_align': 'htbp',
@@ -134,8 +133,7 @@ latex_elements = {
# (source start file, target name, title,
# author, documentclass [howto, manual, or own class]).
latex_documents = [
- (master_doc, 'cmd2.tex', 'cmd2 Documentation',
- 'Catherine Devlin and Todd Leonhardt', 'manual'),
+ (master_doc, 'cmd2.tex', 'cmd2 Documentation', 'Catherine Devlin and Todd Leonhardt', 'manual'),
]
@@ -143,10 +141,7 @@ latex_documents = [
# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
-man_pages = [
- (master_doc, 'cmd2', 'cmd2 Documentation',
- [author], 1)
-]
+man_pages = [(master_doc, 'cmd2', 'cmd2 Documentation', [author], 1)]
# -- Options for Texinfo output -------------------------------------------
@@ -155,9 +150,15 @@ man_pages = [
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
- (master_doc, 'cmd2', 'cmd2 Documentation',
- author, 'cmd2', 'A python package for building powerful command-line interpreter (CLI) programs.',
- 'Miscellaneous'),
+ (
+ master_doc,
+ 'cmd2',
+ 'cmd2 Documentation',
+ author,
+ 'cmd2',
+ 'A python package for building powerful command-line interpreter (CLI) programs.',
+ 'Miscellaneous',
+ ),
]
@@ -166,9 +167,7 @@ texinfo_documents = [
intersphinx_mapping = {'http://docs.python.org/': None}
# options for autodoc
-autodoc_default_options = {
- 'member-order': 'bysource'
-}
+autodoc_default_options = {'member-order': 'bysource'}
# Ignore nitpicky warnings from autodoc which are occurring for very new versions of Sphinx and autodoc
# They seem to be happening because autodoc is now trying to add hyperlinks to docs for typehint classes