Skip to content

Commit

Permalink
chore: format code with black and isort.
Browse files Browse the repository at this point in the history
  • Loading branch information
overcat committed Jul 28, 2021
1 parent 626297c commit 11440d9
Show file tree
Hide file tree
Showing 230 changed files with 573 additions and 480 deletions.
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,8 @@ lock:
pipenv lock --requirements > requirements.txt
pipenv lock --requirements --dev > requirements-dev.txt
.PHONY: lock

format:
isort .
black --required-version 21.7b0 .
.PHONY: format
2 changes: 2 additions & 0 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ sphinx-autodoc-typehints = "*"
pytest-timeout = "*"
pytest-asyncio = "*"
pytest-httpserver = "*"
black = "==21.7b0"
isort = "==5.9.2"

[packages]
pynacl = "*"
Expand Down
103 changes: 101 additions & 2 deletions Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

71 changes: 37 additions & 34 deletions docs/en/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
import sys

# Insert py-stellar-base's Path for Autodoc
sys.path.insert(0, os.path.abspath('..'))
sys.path.insert(0, os.path.abspath(".."))

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

Expand All @@ -33,33 +33,34 @@
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.coverage',
'sphinx.ext.intersphinx',
'sphinx.ext.viewcode',
'sphinx_autodoc_typehints'
"sphinx.ext.autodoc",
"sphinx.ext.coverage",
"sphinx.ext.intersphinx",
"sphinx.ext.viewcode",
"sphinx_autodoc_typehints",
]

intersphinx_mapping = {'python': ('https://docs.python.org/3', None)}
intersphinx_mapping = {"python": ("https://docs.python.org/3", None)}

# 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 master toctree document.
master_doc = 'index'
master_doc = "index"

# General information about the project.
project = 'py-stellar-base'
copyright = '2019, StellarCN and Individual Contributors'
author = 'StellarCN and Individual Contributors'
project = "py-stellar-base"
copyright = "2019, StellarCN and Individual Contributors"
author = "StellarCN and Individual Contributors"

import stellar_sdk

# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
Expand All @@ -74,15 +75,15 @@
#
# This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line for these cases.
language = 'en'
language = "en"

# 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 name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'
pygments_style = "sphinx"

# If true, `todo` and `todoList` produce output, else they produce nothing.
todo_include_todos = False
Expand All @@ -92,16 +93,13 @@
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = 'sphinx_rtd_theme'
html_theme = "sphinx_rtd_theme"

# 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 = {
'collapse_navigation': False,
'style_external_links': False
}
html_theme_options = {"collapse_navigation": False, "style_external_links": False}

# 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,
Expand Down Expand Up @@ -131,23 +129,20 @@
# -- Options for HTMLHelp output ------------------------------------------

# Output file base name for HTML help builder.
htmlhelp_basename = 'py-stellar-base-doc'
htmlhelp_basename = "py-stellar-base-doc"

# -- 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',
Expand All @@ -157,26 +152,34 @@
# (source start file, target name, title,
# author, documentclass [howto, manual, or own class]).
latex_documents = [
(master_doc, 'py-stellar-base.tex', 'py-stellar-base Documentation',
'Stellar Community', 'manual'),
(
master_doc,
"py-stellar-base.tex",
"py-stellar-base Documentation",
"Stellar Community",
"manual",
),
]

# -- Options for manual page output ---------------------------------------

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

# -- Options for Texinfo output -------------------------------------------

# Grouping the document tree into Texinfo files. List of tuples
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
(master_doc, 'py-stellar-base', 'py-stellar-base Documentation',
author, 'py-stellar-base', 'One line description of project.',
'Miscellaneous'),
(
master_doc,
"py-stellar-base",
"py-stellar-base Documentation",
author,
"py-stellar-base",
"One line description of project.",
"Miscellaneous",
),
]
Loading

0 comments on commit 11440d9

Please sign in to comment.