Skip to content

Commit 7699259

Browse files
committed
black is the new pylint
1 parent cdca40a commit 7699259

File tree

2 files changed

+86
-78
lines changed

2 files changed

+86
-78
lines changed

docs/conf.py

Lines changed: 65 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,19 @@
22

33
import os
44
import sys
5-
sys.path.insert(0, os.path.abspath('..'))
5+
6+
sys.path.insert(0, os.path.abspath(".."))
67

78
# -- General configuration ------------------------------------------------
89

910
# Add any Sphinx extension module names here, as strings. They can be
1011
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
1112
# ones.
1213
extensions = [
13-
'sphinx.ext.autodoc',
14-
'sphinx.ext.intersphinx',
15-
'sphinx.ext.napoleon',
16-
'sphinx.ext.todo',
14+
"sphinx.ext.autodoc",
15+
"sphinx.ext.intersphinx",
16+
"sphinx.ext.napoleon",
17+
"sphinx.ext.todo",
1718
]
1819

1920
# Uncomment the below if you use native CircuitPython modules such as
@@ -22,29 +23,32 @@
2223
autodoc_mock_imports = ["busio"]
2324

2425

25-
intersphinx_mapping = {'python': ('https://docs.python.org/3.4', None),'CircuitPython': ('https://circuitpython.readthedocs.io/en/latest/', None)}
26+
intersphinx_mapping = {
27+
"python": ("https://docs.python.org/3.4", None),
28+
"CircuitPython": ("https://circuitpython.readthedocs.io/en/latest/", None),
29+
}
2630

2731
# Add any paths that contain templates here, relative to this directory.
28-
templates_path = ['_templates']
32+
templates_path = ["_templates"]
2933

30-
source_suffix = '.rst'
34+
source_suffix = ".rst"
3135

3236
# The master toctree document.
33-
master_doc = 'index'
37+
master_doc = "index"
3438

3539
# General information about the project.
36-
project = u'Adafruit RockBlock Library'
37-
copyright = u'2020 Carter Nelson'
38-
author = u'Carter Nelson'
40+
project = u"Adafruit RockBlock Library"
41+
copyright = u"2020 Carter Nelson"
42+
author = u"Carter Nelson"
3943

4044
# The version info for the project you're documenting, acts as replacement for
4145
# |version| and |release|, also used in various other places throughout the
4246
# built documents.
4347
#
4448
# The short X.Y version.
45-
version = u'1.0'
49+
version = u"1.0"
4650
# The full version, including alpha/beta/rc tags.
47-
release = u'1.0'
51+
release = u"1.0"
4852

4953
# The language for content autogenerated by Sphinx. Refer to documentation
5054
# for a list of supported languages.
@@ -56,7 +60,7 @@
5660
# List of patterns, relative to source directory, that match files and
5761
# directories to ignore when looking for source files.
5862
# This patterns also effect to html_static_path and html_extra_path
59-
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store', '.env', 'CODE_OF_CONDUCT.md']
63+
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store", ".env", "CODE_OF_CONDUCT.md"]
6064

6165
# The reST default role (used for this markup: `text`) to use for all
6266
# documents.
@@ -68,7 +72,7 @@
6872
add_function_parentheses = True
6973

7074
# The name of the Pygments (syntax highlighting) style to use.
71-
pygments_style = 'sphinx'
75+
pygments_style = "sphinx"
7276

7377
# If true, `todo` and `todoList` produce output, else they produce nothing.
7478
todo_include_todos = False
@@ -83,68 +87,76 @@
8387
# The theme to use for HTML and HTML Help pages. See the documentation for
8488
# a list of builtin themes.
8589
#
86-
on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
90+
on_rtd = os.environ.get("READTHEDOCS", None) == "True"
8791

8892
if not on_rtd: # only import and set the theme if we're building docs locally
8993
try:
9094
import sphinx_rtd_theme
91-
html_theme = 'sphinx_rtd_theme'
92-
html_theme_path = [sphinx_rtd_theme.get_html_theme_path(), '.']
95+
96+
html_theme = "sphinx_rtd_theme"
97+
html_theme_path = [sphinx_rtd_theme.get_html_theme_path(), "."]
9398
except:
94-
html_theme = 'default'
95-
html_theme_path = ['.']
99+
html_theme = "default"
100+
html_theme_path = ["."]
96101
else:
97-
html_theme_path = ['.']
102+
html_theme_path = ["."]
98103

99104
# Add any paths that contain custom static files (such as style sheets) here,
100105
# relative to this directory. They are copied after the builtin static files,
101106
# so a file named "default.css" will overwrite the builtin "default.css".
102-
html_static_path = ['_static']
107+
html_static_path = ["_static"]
103108

104109
# The name of an image file (relative to this directory) to use as a favicon of
105110
# the docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
106111
# pixels large.
107112
#
108-
html_favicon = '_static/favicon.ico'
113+
html_favicon = "_static/favicon.ico"
109114

110115
# Output file base name for HTML help builder.
111-
htmlhelp_basename = 'AdafruitRockblockLibrarydoc'
116+
htmlhelp_basename = "AdafruitRockblockLibrarydoc"
112117

113118
# -- Options for LaTeX output ---------------------------------------------
114119

115120
latex_elements = {
116-
# The paper size ('letterpaper' or 'a4paper').
117-
#
118-
# 'papersize': 'letterpaper',
119-
120-
# The font size ('10pt', '11pt' or '12pt').
121-
#
122-
# 'pointsize': '10pt',
123-
124-
# Additional stuff for the LaTeX preamble.
125-
#
126-
# 'preamble': '',
127-
128-
# Latex figure (float) alignment
129-
#
130-
# 'figure_align': 'htbp',
121+
# The paper size ('letterpaper' or 'a4paper').
122+
#
123+
# 'papersize': 'letterpaper',
124+
# The font size ('10pt', '11pt' or '12pt').
125+
#
126+
# 'pointsize': '10pt',
127+
# Additional stuff for the LaTeX preamble.
128+
#
129+
# 'preamble': '',
130+
# Latex figure (float) alignment
131+
#
132+
# 'figure_align': 'htbp',
131133
}
132134

133135
# Grouping the document tree into LaTeX files. List of tuples
134136
# (source start file, target name, title,
135137
# author, documentclass [howto, manual, or own class]).
136138
latex_documents = [
137-
(master_doc, 'AdafruitRockBlockLibrary.tex', u'AdafruitRockBlock Library Documentation',
138-
author, 'manual'),
139+
(
140+
master_doc,
141+
"AdafruitRockBlockLibrary.tex",
142+
u"AdafruitRockBlock Library Documentation",
143+
author,
144+
"manual",
145+
),
139146
]
140147

141148
# -- Options for manual page output ---------------------------------------
142149

143150
# One entry per manual page. List of tuples
144151
# (source start file, name, description, authors, manual section).
145152
man_pages = [
146-
(master_doc, 'AdafruitRockBlocklibrary', u'Adafruit RockBlock Library Documentation',
147-
[author], 1)
153+
(
154+
master_doc,
155+
"AdafruitRockBlocklibrary",
156+
u"Adafruit RockBlock Library Documentation",
157+
[author],
158+
1,
159+
)
148160
]
149161

150162
# -- Options for Texinfo output -------------------------------------------
@@ -153,7 +165,13 @@
153165
# (source start file, target name, title, author,
154166
# dir menu entry, description, category)
155167
texinfo_documents = [
156-
(master_doc, 'AdafruitRockBlockLibrary', u'Adafruit RockBlock Library Documentation',
157-
author, 'AdafruitRockBlockLibrary', 'One line description of project.',
158-
'Miscellaneous'),
168+
(
169+
master_doc,
170+
"AdafruitRockBlockLibrary",
171+
u"Adafruit RockBlock Library Documentation",
172+
author,
173+
"AdafruitRockBlockLibrary",
174+
"One line description of project.",
175+
"Miscellaneous",
176+
),
159177
]

setup.py

Lines changed: 21 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -6,58 +6,48 @@
66
"""
77

88
from setuptools import setup, find_packages
9+
910
# To use a consistent encoding
1011
from codecs import open
1112
from os import path
1213

1314
here = path.abspath(path.dirname(__file__))
1415

1516
# Get the long description from the README file
16-
with open(path.join(here, 'README.rst'), encoding='utf-8') as f:
17+
with open(path.join(here, "README.rst"), encoding="utf-8") as f:
1718
long_description = f.read()
1819

1920
setup(
20-
name='adafruit-circuitpython-rockblock',
21-
21+
name="adafruit-circuitpython-rockblock",
2222
use_scm_version=True,
23-
setup_requires=['setuptools_scm'],
24-
25-
description='CircuitPython driver for Rock Seven RockBLOCK Iridium satellite modem',
23+
setup_requires=["setuptools_scm"],
24+
description="CircuitPython driver for Rock Seven RockBLOCK Iridium satellite modem",
2625
long_description=long_description,
27-
long_description_content_type='text/x-rst',
28-
26+
long_description_content_type="text/x-rst",
2927
# The project's main homepage.
30-
url='https://github.com/adafruit/Adafruit_CircuitPython_RockBlock',
31-
28+
url="https://github.com/adafruit/Adafruit_CircuitPython_RockBlock",
3229
# Author details
33-
author='Adafruit Industries',
34-
author_email='[email protected]',
35-
36-
install_requires=[
37-
'Adafruit-Blinka'
38-
],
39-
30+
author="Adafruit Industries",
31+
author_email="[email protected]",
32+
install_requires=["Adafruit-Blinka"],
4033
# Choose your license
41-
license='MIT',
42-
34+
license="MIT",
4335
# See https://pypi.python.org/pypi?%3Aaction=list_classifiers
4436
classifiers=[
45-
'Development Status :: 3 - Alpha',
46-
'Intended Audience :: Developers',
47-
'Topic :: Software Development :: Libraries',
48-
'Topic :: System :: Hardware',
49-
'License :: OSI Approved :: MIT License',
50-
'Programming Language :: Python :: 3',
51-
'Programming Language :: Python :: 3.4',
52-
'Programming Language :: Python :: 3.5',
37+
"Development Status :: 3 - Alpha",
38+
"Intended Audience :: Developers",
39+
"Topic :: Software Development :: Libraries",
40+
"Topic :: System :: Hardware",
41+
"License :: OSI Approved :: MIT License",
42+
"Programming Language :: Python :: 3",
43+
"Programming Language :: Python :: 3.4",
44+
"Programming Language :: Python :: 3.5",
5345
],
54-
5546
# What does your project relate to?
56-
keywords='adafruit blinka circuitpython micropython rockblock iridium, satellite',
57-
47+
keywords="adafruit blinka circuitpython micropython rockblock iridium, satellite",
5848
# You can just specify the packages manually here if your project is
5949
# simple. Or you can use find_packages().
6050
# TODO: IF LIBRARY FILES ARE A PACKAGE FOLDER,
6151
# CHANGE `py_modules=['...']` TO `packages=['...']`
62-
py_modules=['adafruit_rockblock'],
52+
py_modules=["adafruit_rockblock"],
6353
)

0 commit comments

Comments
 (0)