Skip to content

Commit b92dbd2

Browse files
committed
Ran black, updated to pylint 2.x
1 parent 71d2704 commit b92dbd2

File tree

4 files changed

+93
-78
lines changed

4 files changed

+93
-78
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

adafruit_mlx90614.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@
8787
_MLX90614_ID3 = const(0x3E)
8888
_MLX90614_ID4 = const(0x3F)
8989

90+
9091
class MLX90614:
9192
"""Create an instance of the MLX90614 temperature sensor. You must pass in
9293
the following parameters:

docs/conf.py

Lines changed: 69 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
# TODO: Please Read!
@@ -22,29 +23,36 @@
2223
# autodoc module docs will fail to generate with a warning.
2324
# autodoc_mock_imports = ["micropython", "adafruit_bus_device"]
2425

25-
intersphinx_mapping = {'python': ('https://docs.python.org/3.4', None),'BusDevice': ('https://circuitpython.readthedocs.io/projects/busdevice/en/latest/', None),'CircuitPython': ('https://circuitpython.readthedocs.io/en/latest/', None)}
26+
intersphinx_mapping = {
27+
"python": ("https://docs.python.org/3.4", None),
28+
"BusDevice": (
29+
"https://circuitpython.readthedocs.io/projects/busdevice/en/latest/",
30+
None,
31+
),
32+
"CircuitPython": ("https://circuitpython.readthedocs.io/en/latest/", None),
33+
}
2634

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

30-
source_suffix = '.rst'
38+
source_suffix = ".rst"
3139

3240
# The master toctree document.
33-
master_doc = 'index'
41+
master_doc = "index"
3442

3543
# General information about the project.
36-
project = u'Adafruit mlx90614 Library'
37-
copyright = u'2018 Mikey Sklar'
38-
author = u'Mikey Sklar'
44+
project = u"Adafruit mlx90614 Library"
45+
copyright = u"2018 Mikey Sklar"
46+
author = u"Mikey Sklar"
3947

4048
# The version info for the project you're documenting, acts as replacement for
4149
# |version| and |release|, also used in various other places throughout the
4250
# built documents.
4351
#
4452
# The short X.Y version.
45-
version = u'1.0'
53+
version = u"1.0"
4654
# The full version, including alpha/beta/rc tags.
47-
release = u'1.0'
55+
release = u"1.0"
4856

4957
# The language for content autogenerated by Sphinx. Refer to documentation
5058
# for a list of supported languages.
@@ -56,7 +64,7 @@
5664
# List of patterns, relative to source directory, that match files and
5765
# directories to ignore when looking for source files.
5866
# 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']
67+
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store", ".env", "CODE_OF_CONDUCT.md"]
6068

6169
# The reST default role (used for this markup: `text`) to use for all
6270
# documents.
@@ -68,7 +76,7 @@
6876
add_function_parentheses = True
6977

7078
# The name of the Pygments (syntax highlighting) style to use.
71-
pygments_style = 'sphinx'
79+
pygments_style = "sphinx"
7280

7381
# If true, `todo` and `todoList` produce output, else they produce nothing.
7482
todo_include_todos = False
@@ -83,68 +91,76 @@
8391
# The theme to use for HTML and HTML Help pages. See the documentation for
8492
# a list of builtin themes.
8593
#
86-
on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
94+
on_rtd = os.environ.get("READTHEDOCS", None) == "True"
8795

8896
if not on_rtd: # only import and set the theme if we're building docs locally
8997
try:
9098
import sphinx_rtd_theme
91-
html_theme = 'sphinx_rtd_theme'
92-
html_theme_path = [sphinx_rtd_theme.get_html_theme_path(), '.']
99+
100+
html_theme = "sphinx_rtd_theme"
101+
html_theme_path = [sphinx_rtd_theme.get_html_theme_path(), "."]
93102
except:
94-
html_theme = 'default'
95-
html_theme_path = ['.']
103+
html_theme = "default"
104+
html_theme_path = ["."]
96105
else:
97-
html_theme_path = ['.']
106+
html_theme_path = ["."]
98107

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

104113
# The name of an image file (relative to this directory) to use as a favicon of
105114
# the docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
106115
# pixels large.
107116
#
108-
html_favicon = '_static/favicon.ico'
117+
html_favicon = "_static/favicon.ico"
109118

110119
# Output file base name for HTML help builder.
111-
htmlhelp_basename = 'AdafruitMlx90614Librarydoc'
120+
htmlhelp_basename = "AdafruitMlx90614Librarydoc"
112121

113122
# -- Options for LaTeX output ---------------------------------------------
114123

115124
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',
125+
# The paper size ('letterpaper' or 'a4paper').
126+
#
127+
# 'papersize': 'letterpaper',
128+
# The font size ('10pt', '11pt' or '12pt').
129+
#
130+
# 'pointsize': '10pt',
131+
# Additional stuff for the LaTeX preamble.
132+
#
133+
# 'preamble': '',
134+
# Latex figure (float) alignment
135+
#
136+
# 'figure_align': 'htbp',
131137
}
132138

133139
# Grouping the document tree into LaTeX files. List of tuples
134140
# (source start file, target name, title,
135141
# author, documentclass [howto, manual, or own class]).
136142
latex_documents = [
137-
(master_doc, 'Adafruitmlx90614Library.tex', u'Adafruitmlx90614 Library Documentation',
138-
author, 'manual'),
143+
(
144+
master_doc,
145+
"Adafruitmlx90614Library.tex",
146+
u"Adafruitmlx90614 Library Documentation",
147+
author,
148+
"manual",
149+
),
139150
]
140151

141152
# -- Options for manual page output ---------------------------------------
142153

143154
# One entry per manual page. List of tuples
144155
# (source start file, name, description, authors, manual section).
145156
man_pages = [
146-
(master_doc, 'Adafruitmlx90614library', u'Adafruit mlx90614 Library Documentation',
147-
[author], 1)
157+
(
158+
master_doc,
159+
"Adafruitmlx90614library",
160+
u"Adafruit mlx90614 Library Documentation",
161+
[author],
162+
1,
163+
)
148164
]
149165

150166
# -- Options for Texinfo output -------------------------------------------
@@ -153,7 +169,13 @@
153169
# (source start file, target name, title, author,
154170
# dir menu entry, description, category)
155171
texinfo_documents = [
156-
(master_doc, 'Adafruitmlx90614Library', u'Adafruit mlx90614 Library Documentation',
157-
author, 'Adafruitmlx90614Library', 'One line description of project.',
158-
'Miscellaneous'),
172+
(
173+
master_doc,
174+
"Adafruitmlx90614Library",
175+
u"Adafruit mlx90614 Library Documentation",
176+
author,
177+
"Adafruitmlx90614Library",
178+
"One line description of project.",
179+
"Miscellaneous",
180+
),
159181
]

setup.py

Lines changed: 22 additions & 30 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-mlx90614',
22-
22+
name="adafruit-circuitpython-mlx90614",
2323
use_scm_version=True,
24-
setup_requires=['setuptools_scm'],
25-
26-
description='CircuitPython module for the Melexis MLX90614 Contact-less Infrared'
27-
'Temperature sensor.',
24+
setup_requires=["setuptools_scm"],
25+
description="CircuitPython module for the Melexis MLX90614 Contact-less Infrared"
26+
"Temperature sensor.",
2827
long_description=long_description,
29-
long_description_content_type='text/x-rst',
30-
28+
long_description_content_type="text/x-rst",
3129
# The project's main homepage.
32-
url='https://github.com/adafruit/Adafruit_CircuitPython_MLX90614',
33-
30+
url="https://github.com/adafruit/Adafruit_CircuitPython_MLX90614",
3431
# Author details
35-
author='Adafruit Industries',
36-
author_email='[email protected]',
37-
38-
install_requires=['Adafruit-Blinka', 'adafruit-circuitpython-busdevice'],
39-
32+
author="Adafruit Industries",
33+
author_email="[email protected]",
34+
install_requires=["Adafruit-Blinka", "adafruit-circuitpython-busdevice"],
4035
# Choose your license
41-
license='MIT',
42-
36+
license="MIT",
4337
# See https://pypi.python.org/pypi?%3Aaction=list_classifiers
4438
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',
39+
"Development Status :: 3 - Alpha",
40+
"Intended Audience :: Developers",
41+
"Topic :: Software Development :: Libraries",
42+
"Topic :: System :: Hardware",
43+
"License :: OSI Approved :: MIT License",
44+
"Programming Language :: Python :: 3",
45+
"Programming Language :: Python :: 3.4",
46+
"Programming Language :: Python :: 3.5",
5347
],
54-
5548
# What does your project relate to?
56-
keywords='adafruit mlx90614 temperature hardware infrared IR sensor micropython circuitpython',
57-
49+
keywords="adafruit mlx90614 temperature hardware infrared IR sensor 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_mlx90614'],
52+
py_modules=["adafruit_mlx90614"],
6153
)

0 commit comments

Comments
 (0)