Skip to content

Commit d886fab

Browse files
authored
Merge pull request #17 from adafruit/pylint-update
Ran black, updated to pylint 2.x
2 parents ba69092 + 03c39d3 commit d886fab

File tree

4 files changed

+88
-77
lines changed

4 files changed

+88
-77
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
source actions-ci/install.sh
4141
- name: Pip install pylint, black, & Sphinx
4242
run: |
43-
pip install --force-reinstall pylint==1.9.2 black==19.10b0 Sphinx sphinx-rtd-theme
43+
pip install --force-reinstall pylint black==19.10b0 Sphinx sphinx-rtd-theme
4444
- name: Library version
4545
run: git describe --dirty --always --tags
4646
- name: PyLint

.pylintrc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,8 @@ spelling-store-unknown-words=no
119119
[MISCELLANEOUS]
120120

121121
# List of note tags to take in consideration, separated by a comma.
122-
notes=FIXME,XXX,TODO
122+
# notes=FIXME,XXX,TODO
123+
notes=FIXME,XXX
123124

124125

125126
[TYPECHECK]

docs/conf.py

Lines changed: 64 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -2,42 +2,46 @@
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.viewcode',
14+
"sphinx.ext.autodoc",
15+
"sphinx.ext.intersphinx",
16+
"sphinx.ext.viewcode",
1617
]
1718

18-
intersphinx_mapping = {'python': ('https://docs.python.org/3.4', None),'CircuitPython': ('https://circuitpython.readthedocs.io/en/latest/', None)}
19+
intersphinx_mapping = {
20+
"python": ("https://docs.python.org/3.4", None),
21+
"CircuitPython": ("https://circuitpython.readthedocs.io/en/latest/", None),
22+
}
1923

2024
# Add any paths that contain templates here, relative to this directory.
21-
templates_path = ['_templates']
25+
templates_path = ["_templates"]
2226

23-
source_suffix = '.rst'
27+
source_suffix = ".rst"
2428

2529
# The master toctree document.
26-
master_doc = 'index'
30+
master_doc = "index"
2731

2832
# General information about the project.
29-
project = u'Adafruit WAVEFORM Library'
30-
copyright = u'2017 Scott Shawcroft'
31-
author = u'Scott Shawcroft'
33+
project = u"Adafruit WAVEFORM Library"
34+
copyright = u"2017 Scott Shawcroft"
35+
author = u"Scott Shawcroft"
3236

3337
# The version info for the project you're documenting, acts as replacement for
3438
# |version| and |release|, also used in various other places throughout the
3539
# built documents.
3640
#
3741
# The short X.Y version.
38-
version = u'1.0'
42+
version = u"1.0"
3943
# The full version, including alpha/beta/rc tags.
40-
release = u'1.0'
44+
release = u"1.0"
4145

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

5458
# The reST default role (used for this markup: `text`) to use for all
5559
# documents.
@@ -61,7 +65,7 @@
6165
add_function_parentheses = True
6266

6367
# The name of the Pygments (syntax highlighting) style to use.
64-
pygments_style = 'sphinx'
68+
pygments_style = "sphinx"
6569

6670
# If true, `todo` and `todoList` produce output, else they produce nothing.
6771
todo_include_todos = False
@@ -75,68 +79,76 @@
7579
# The theme to use for HTML and HTML Help pages. See the documentation for
7680
# a list of builtin themes.
7781
#
78-
on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
82+
on_rtd = os.environ.get("READTHEDOCS", None) == "True"
7983

8084
if not on_rtd: # only import and set the theme if we're building docs locally
8185
try:
8286
import sphinx_rtd_theme
83-
html_theme = 'sphinx_rtd_theme'
84-
html_theme_path = [sphinx_rtd_theme.get_html_theme_path(), '.']
87+
88+
html_theme = "sphinx_rtd_theme"
89+
html_theme_path = [sphinx_rtd_theme.get_html_theme_path(), "."]
8590
except:
86-
html_theme = 'default'
87-
html_theme_path = ['.']
91+
html_theme = "default"
92+
html_theme_path = ["."]
8893
else:
89-
html_theme_path = ['.']
94+
html_theme_path = ["."]
9095

9196
# Add any paths that contain custom static files (such as style sheets) here,
9297
# relative to this directory. They are copied after the builtin static files,
9398
# so a file named "default.css" will overwrite the builtin "default.css".
94-
html_static_path = ['_static']
99+
html_static_path = ["_static"]
95100

96101
# The name of an image file (relative to this directory) to use as a favicon of
97102
# the docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
98103
# pixels large.
99104
#
100-
html_favicon = '_static/favicon.ico'
105+
html_favicon = "_static/favicon.ico"
101106

102107
# Output file base name for HTML help builder.
103-
htmlhelp_basename = 'AdafruitWAVEFORMLibrarydoc'
108+
htmlhelp_basename = "AdafruitWAVEFORMLibrarydoc"
104109

105110
# -- Options for LaTeX output ---------------------------------------------
106111

107112
latex_elements = {
108-
# The paper size ('letterpaper' or 'a4paper').
109-
#
110-
# 'papersize': 'letterpaper',
111-
112-
# The font size ('10pt', '11pt' or '12pt').
113-
#
114-
# 'pointsize': '10pt',
115-
116-
# Additional stuff for the LaTeX preamble.
117-
#
118-
# 'preamble': '',
119-
120-
# Latex figure (float) alignment
121-
#
122-
# 'figure_align': 'htbp',
113+
# The paper size ('letterpaper' or 'a4paper').
114+
#
115+
# 'papersize': 'letterpaper',
116+
# The font size ('10pt', '11pt' or '12pt').
117+
#
118+
# 'pointsize': '10pt',
119+
# Additional stuff for the LaTeX preamble.
120+
#
121+
# 'preamble': '',
122+
# Latex figure (float) alignment
123+
#
124+
# 'figure_align': 'htbp',
123125
}
124126

125127
# Grouping the document tree into LaTeX files. List of tuples
126128
# (source start file, target name, title,
127129
# author, documentclass [howto, manual, or own class]).
128130
latex_documents = [
129-
(master_doc, 'AdafruitWAVEFORMLibrary.tex', u'Adafruit WAVEFORM Library Documentation',
130-
author, 'manual'),
131+
(
132+
master_doc,
133+
"AdafruitWAVEFORMLibrary.tex",
134+
u"Adafruit WAVEFORM Library Documentation",
135+
author,
136+
"manual",
137+
),
131138
]
132139

133140
# -- Options for manual page output ---------------------------------------
134141

135142
# One entry per manual page. List of tuples
136143
# (source start file, name, description, authors, manual section).
137144
man_pages = [
138-
(master_doc, 'adafruitWAVEFORMlibrary', u'Adafruit WAVEFORM Library Documentation',
139-
[author], 1)
145+
(
146+
master_doc,
147+
"adafruitWAVEFORMlibrary",
148+
u"Adafruit WAVEFORM Library Documentation",
149+
[author],
150+
1,
151+
)
140152
]
141153

142154
# -- Options for Texinfo output -------------------------------------------
@@ -145,7 +157,13 @@
145157
# (source start file, target name, title, author,
146158
# dir menu entry, description, category)
147159
texinfo_documents = [
148-
(master_doc, 'AdafruitWAVEFORMLibrary', u'Adafruit WAVEFORM Library Documentation',
149-
author, 'AdafruitWAVEFORMLibrary', 'One line description of project.',
150-
'Miscellaneous'),
160+
(
161+
master_doc,
162+
"AdafruitWAVEFORMLibrary",
163+
u"Adafruit WAVEFORM Library Documentation",
164+
author,
165+
"AdafruitWAVEFORMLibrary",
166+
"One line description of project.",
167+
"Miscellaneous",
168+
),
151169
]

setup.py

Lines changed: 21 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -7,55 +7,47 @@
77

88
# Always prefer setuptools over distutils
99
from setuptools import setup, find_packages
10+
1011
# To use a consistent encoding
1112
from codecs import open
1213
from os import path
1314

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

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

2021
setup(
21-
name='adafruit-circuitpython-waveform',
22-
22+
name="adafruit-circuitpython-waveform",
2323
use_scm_version=True,
24-
setup_requires=['setuptools_scm'],
25-
26-
description='CircuitPython library for generating simple waveforms for audio.',
24+
setup_requires=["setuptools_scm"],
25+
description="CircuitPython library for generating simple waveforms for audio.",
2726
long_description=long_description,
28-
long_description_content_type='text/x-rst',
29-
27+
long_description_content_type="text/x-rst",
3028
# The project's main homepage.
31-
url='https://github.com/adafruit/Adafruit_CircuitPython_Waveform',
32-
29+
url="https://github.com/adafruit/Adafruit_CircuitPython_Waveform",
3330
# Author details
34-
author='Adafruit Industries',
35-
author_email='circuitpython@adafruit.com',
36-
31+
author="Adafruit Industries",
32+
author_email="circuitpython@adafruit.com",
3733
install_requires=[],
38-
3934
# Choose your license
40-
license='MIT',
41-
35+
license="MIT",
4236
# See https://pypi.python.org/pypi?%3Aaction=list_classifiers
4337
classifiers=[
44-
'Development Status :: 3 - Alpha',
45-
'Intended Audience :: Developers',
46-
'Topic :: Software Development :: Libraries',
47-
'Topic :: System :: Hardware',
48-
'License :: OSI Approved :: MIT License',
49-
'Programming Language :: Python :: 3',
50-
'Programming Language :: Python :: 3.4',
51-
'Programming Language :: Python :: 3.5',
38+
"Development Status :: 3 - Alpha",
39+
"Intended Audience :: Developers",
40+
"Topic :: Software Development :: Libraries",
41+
"Topic :: System :: Hardware",
42+
"License :: OSI Approved :: MIT License",
43+
"Programming Language :: Python :: 3",
44+
"Programming Language :: Python :: 3.4",
45+
"Programming Language :: Python :: 3.5",
5246
],
53-
5447
# What does your project relate to?
55-
keywords='adafruit haptic waveform signal audio rtttl sine square'
56-
'wave hardware micropython circuitpython',
57-
48+
keywords="adafruit haptic waveform signal audio rtttl sine square"
49+
"wave hardware micropython circuitpython",
5850
# You can just specify the packages manually here if your project is
5951
# simple. Or you can use find_packages().
60-
py_modules=['adafruit_waveform'],
52+
py_modules=["adafruit_waveform"],
6153
)

0 commit comments

Comments
 (0)