Skip to content

Commit

Permalink
Reformat code using Black formatter (#432)
Browse files Browse the repository at this point in the history

Co-authored-by: sijmenhuizenga <sijmenhuizenga@gmail.com>
  • Loading branch information
MartinThoma and SijmenHuizenga committed Feb 9, 2021
1 parent dc3780b commit 32a1400
Show file tree
Hide file tree
Showing 8 changed files with 391 additions and 322 deletions.
3 changes: 2 additions & 1 deletion AUTHORS.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,5 @@ Thanks to all the wonderful folks who have contributed to schedule over the year
- gaguirregabiria <https://github.com/gaguirregabiria>
- rhagenaars <https://github.com/RHagenaars>
- Skenvy <https://github.com/skenvy>
- zcking <https://github.com/zcking>
- zcking <https://github.com/zcking>
- Martin Thoma <https://github.com/MartinThoma>
110 changes: 61 additions & 49 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
#
import os
import sys
sys.path.insert(0, os.path.abspath('..'))

sys.path.insert(0, os.path.abspath(".."))

# -- General configuration ------------------------------------------------

Expand All @@ -32,31 +33,31 @@
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.todo',
'sphinx.ext.coverage',
'sphinx.ext.viewcode',
"sphinx.ext.autodoc",
"sphinx.ext.todo",
"sphinx.ext.coverage",
"sphinx.ext.viewcode",
# 'sphinx.ext.githubpages', # This breaks the ReadTheDocs build
]

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
templates_path = ["_templates"]

# The suffix(es) of source filenames.
# You can specify multiple suffix as a list of string:
#
# source_suffix = ['.rst', '.md']
source_suffix = '.rst'
source_suffix = ".rst"

# The encoding of source files.
#
# source_encoding = 'utf-8-sig'

# The master toctree document.
master_doc = 'index'
master_doc = "index"

# General information about the project.
project = u'schedule'
project = u"schedule"
copyright = u'2020, <a href="https://dbader.org/">Daniel Bader</a>'
author = u'<a href="https://dbader.org/">Daniel Bader</a>'

Expand All @@ -65,9 +66,9 @@
# built documents.
#
# The short X.Y version.
version = u'0.4.0'
version = u"0.4.0"
# The full version, including alpha/beta/rc tags.
release = u'0.4.0'
release = u"0.4.0"

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand All @@ -88,7 +89,7 @@
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This patterns also effect to html_static_path and html_extra_path
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]

# The reST default role (used for this markup: `text`) to use for all
# documents.
Expand Down Expand Up @@ -127,20 +128,20 @@
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = 'alabaster'
html_theme = "alabaster"

# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
# documentation.
#
html_theme_options = {
'show_powered_by': False,
'github_user': 'dbader',
'github_repo': 'schedule',
'github_banner': True,
'github_button': True,
'github_type': 'star',
'show_related': False
"show_powered_by": False,
"github_user": "dbader",
"github_repo": "schedule",
"github_banner": True,
"github_button": True,
"github_type": "star",
"show_related": False,
}

# Add any paths that contain custom themes here, relative to this directory.
Expand Down Expand Up @@ -169,7 +170,7 @@
# 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,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']
html_static_path = ["_static"]

# Add any extra paths that contain custom files (such as robots.txt or
# .htaccess) here, relative to this directory. These files are copied
Expand All @@ -191,7 +192,13 @@
# Custom sidebar templates, maps document names to template names.
#
html_sidebars = {
'**': ["about.html", 'globaltoc.html', 'sidebarintro.html', 'relations.html', 'searchbox.html'],
"**": [
"about.html",
"globaltoc.html",
"sidebarintro.html",
"relations.html",
"searchbox.html",
],
}

# Additional templates that should be rendered to pages, maps page names to
Expand Down Expand Up @@ -251,34 +258,36 @@
# html_search_scorer = 'scorer.js'

# Output file base name for HTML help builder.
htmlhelp_basename = 'scheduledoc'
htmlhelp_basename = "scheduledoc"

# -- Options for LaTeX output ---------------------------------------------

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',
# 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',
}

# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title,
# author, documentclass [howto, manual, or own class]).
latex_documents = [
(master_doc, 'schedule.tex', u'schedule Documentation',
u'Daniel Bader', 'manual'),
(
master_doc,
"schedule.tex",
u"schedule Documentation",
u"Daniel Bader",
"manual",
),
]

# The name of an image file (relative to this directory) to place at the top of
Expand Down Expand Up @@ -318,10 +327,7 @@

# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
(master_doc, 'schedule', u'schedule Documentation',
[author], 1)
]
man_pages = [(master_doc, "schedule", u"schedule Documentation", [author], 1)]

# If true, show URL addresses after external links.
#
Expand All @@ -334,9 +340,15 @@
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
(master_doc, 'schedule', u'schedule Documentation',
author, 'schedule', 'One line description of project.',
'Miscellaneous'),
(
master_doc,
"schedule",
u"schedule Documentation",
author,
"schedule",
"One line description of project.",
"Miscellaneous",
),
]

# Documents to append as an appendix to all manuals.
Expand All @@ -355,7 +367,7 @@
#
# texinfo_no_detailmenu = False

autodoc_member_order = 'bysource'
autodoc_member_order = "bysource"

# We're pulling in some external images like CI badges.
suppress_warnings = ['image.nonlocal_uri']
suppress_warnings = ["image.nonlocal_uri"]
10 changes: 10 additions & 0 deletions docs/development.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,16 @@ Running tests
py.test test_schedule.py --flake8 schedule -v --cov schedule --cov-report term-missing
Formatting the code
-------------------
This project uses `black formatter <https://black.readthedocs.io/en/stable/>`_.
To format the code, run:

.. code-block:: bash
black .
Make sure you use version 20.8b1 of black.

Compiling documentation
-----------------------
Expand Down
1 change: 1 addition & 0 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ pytest
pytest-cov
pytest-flake8
Sphinx
black==20.8b1
Loading

0 comments on commit 32a1400

Please sign in to comment.