diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index fff3aa9..1dad804 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -40,7 +40,7 @@ jobs: source actions-ci/install.sh - name: Pip install pylint, black, & Sphinx run: | - pip install --force-reinstall pylint==1.9.2 black==19.10b0 Sphinx sphinx-rtd-theme + pip install --force-reinstall pylint black==19.10b0 Sphinx sphinx-rtd-theme - name: Library version run: git describe --dirty --always --tags - name: PyLint diff --git a/adafruit_button.py b/adafruit_button.py index b325eaa..bfb119e 100755 --- a/adafruit_button.py +++ b/adafruit_button.py @@ -52,7 +52,7 @@ def _check_color(color): # if a tuple is supplied, convert it to a RGB number if isinstance(color, tuple): r, g, b = color - return int((r << 16) + (g << 8) + (b & 0xff)) + return int((r << 16) + (g << 8) + (b & 0xFF)) return color @@ -82,11 +82,24 @@ class Button(displayio.Group): SHADOWRECT = const(2) SHADOWROUNDRECT = const(3) - def __init__(self, *, x, y, width, height, name=None, style=RECT, - fill_color=0xFFFFFF, outline_color=0x0, - label=None, label_font=None, label_color=0x0, - selected_fill=None, selected_outline=None, - selected_label=None): + def __init__( + self, + *, + x, + y, + width, + height, + name=None, + style=RECT, + fill_color=0xFFFFFF, + outline_color=0x0, + label=None, + label_font=None, + label_color=0x0, + selected_fill=None, + selected_outline=None, + selected_label=None + ): super().__init__() self.x = x self.y = y @@ -115,21 +128,49 @@ def __init__(self, *, x, y, width, height, name=None, style=RECT, if (outline_color is not None) or (fill_color is not None): if style == Button.RECT: - self.body = Rect(x, y, width, height, - fill=self.fill_color, outline=self.outline_color) + self.body = Rect( + x, + y, + width, + height, + fill=self.fill_color, + outline=self.outline_color, + ) elif style == Button.ROUNDRECT: - self.body = RoundRect(x, y, width, height, r=10, - fill=self.fill_color, outline=self.outline_color) + self.body = RoundRect( + x, + y, + width, + height, + r=10, + fill=self.fill_color, + outline=self.outline_color, + ) elif style == Button.SHADOWRECT: - self.shadow = Rect(x + 2, y + 2, width - 2, height - 2, - fill=outline_color) - self.body = Rect(x, y, width - 2, height - 2, - fill=self.fill_color, outline=self.outline_color) + self.shadow = Rect( + x + 2, y + 2, width - 2, height - 2, fill=outline_color + ) + self.body = Rect( + x, + y, + width - 2, + height - 2, + fill=self.fill_color, + outline=self.outline_color, + ) elif style == Button.SHADOWROUNDRECT: - self.shadow = RoundRect(x + 2, y + 2, width - 2, height - 2, r=10, - fill=self.outline_color) - self.body = RoundRect(x, y, width - 2, height - 2, r=10, - fill=self.fill_color, outline=self.outline_color) + self.shadow = RoundRect( + x + 2, y + 2, width - 2, height - 2, r=10, fill=self.outline_color + ) + self.body = RoundRect( + x, + y, + width - 2, + height - 2, + r=10, + fill=self.fill_color, + outline=self.outline_color, + ) if self.shadow: self.group.append(self.shadow) self.group.append(self.body) @@ -148,7 +189,7 @@ def label(self, newtext): self._label = None if not newtext or (self._label_color is None): # no new text - return # nothing to do! + return # nothing to do! if not self._label_font: raise RuntimeError("Please provide label font") @@ -164,7 +205,6 @@ def label(self, newtext): if (self.selected_label is None) and (self._label_color is not None): self.selected_label = (~self._label_color) & 0xFFFFFF - @property def selected(self): """Selected inverts the colors.""" @@ -173,7 +213,7 @@ def selected(self): @selected.setter def selected(self, value): if value == self._selected: - return # bail now, nothing more to do + return # bail now, nothing more to do self._selected = value if self._selected: new_fill = self.selected_fill @@ -195,5 +235,6 @@ def contains(self, point): ``button.contains(touch)`` where ``touch`` is the touch point on the screen will allow for determining that a button has been touched. """ - return (self.x <= point[0] <= self.x + self.width) and (self.y <= point[1] <= - self.y + self.height) + return (self.x <= point[0] <= self.x + self.width) and ( + self.y <= point[1] <= self.y + self.height + ) diff --git a/docs/conf.py b/docs/conf.py index 276f652..7741d74 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -2,7 +2,8 @@ import os import sys -sys.path.insert(0, os.path.abspath('..')) + +sys.path.insert(0, os.path.abspath("..")) # -- General configuration ------------------------------------------------ @@ -10,10 +11,10 @@ # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. extensions = [ - 'sphinx.ext.autodoc', - 'sphinx.ext.intersphinx', - 'sphinx.ext.napoleon', - 'sphinx.ext.todo', + "sphinx.ext.autodoc", + "sphinx.ext.intersphinx", + "sphinx.ext.napoleon", + "sphinx.ext.todo", ] # TODO: Please Read! @@ -23,29 +24,32 @@ autodoc_mock_imports = ["displayio", "adafruit_display_text", "adafruit_display_shapes"] -intersphinx_mapping = {'python': ('https://docs.python.org/3.4', None),'CircuitPython': ('https://circuitpython.readthedocs.io/en/latest/', None)} +intersphinx_mapping = { + "python": ("https://docs.python.org/3.4", None), + "CircuitPython": ("https://circuitpython.readthedocs.io/en/latest/", None), +} # Add any paths that contain templates here, relative to this directory. -templates_path = ['_templates'] +templates_path = ["_templates"] -source_suffix = '.rst' +source_suffix = ".rst" # The master toctree document. -master_doc = 'index' +master_doc = "index" # General information about the project. -project = u'Adafruit Display_Button Library' -copyright = u'2019 Limor Fried' -author = u'Limor Fried' +project = u"Adafruit Display_Button Library" +copyright = u"2019 Limor Fried" +author = u"Limor Fried" # 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. # # The short X.Y version. -version = u'1.0' +version = u"1.0" # The full version, including alpha/beta/rc tags. -release = u'1.0' +release = u"1.0" # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. @@ -57,7 +61,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', '.env', 'CODE_OF_CONDUCT.md'] +exclude_patterns = ["_build", "Thumbs.db", ".DS_Store", ".env", "CODE_OF_CONDUCT.md"] # The reST default role (used for this markup: `text`) to use for all # documents. @@ -69,7 +73,7 @@ add_function_parentheses = True # 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 @@ -84,59 +88,62 @@ # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. # -on_rtd = os.environ.get('READTHEDOCS', None) == 'True' +on_rtd = os.environ.get("READTHEDOCS", None) == "True" if not on_rtd: # only import and set the theme if we're building docs locally try: import sphinx_rtd_theme - html_theme = 'sphinx_rtd_theme' - html_theme_path = [sphinx_rtd_theme.get_html_theme_path(), '.'] + + html_theme = "sphinx_rtd_theme" + html_theme_path = [sphinx_rtd_theme.get_html_theme_path(), "."] except: - html_theme = 'default' - html_theme_path = ['.'] + html_theme = "default" + html_theme_path = ["."] else: - html_theme_path = ['.'] + html_theme_path = ["."] # 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"] # The name of an image file (relative to this directory) to use as a favicon of # the docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 # pixels large. # -html_favicon = '_static/favicon.ico' +html_favicon = "_static/favicon.ico" # Output file base name for HTML help builder. -htmlhelp_basename = 'AdafruitDisplay_buttonLibrarydoc' +htmlhelp_basename = "AdafruitDisplay_buttonLibrarydoc" # -- 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, 'AdafruitDisplay_ButtonLibrary.tex', u'AdafruitDisplay_Button Library Documentation', - author, 'manual'), + ( + master_doc, + "AdafruitDisplay_ButtonLibrary.tex", + u"AdafruitDisplay_Button Library Documentation", + author, + "manual", + ), ] # -- Options for manual page output --------------------------------------- @@ -144,8 +151,13 @@ # One entry per manual page. List of tuples # (source start file, name, description, authors, manual section). man_pages = [ - (master_doc, 'AdafruitDisplay_Buttonlibrary', u'Adafruit Display_Button Library Documentation', - [author], 1) + ( + master_doc, + "AdafruitDisplay_Buttonlibrary", + u"Adafruit Display_Button Library Documentation", + [author], + 1, + ) ] # -- Options for Texinfo output ------------------------------------------- @@ -154,7 +166,13 @@ # (source start file, target name, title, author, # dir menu entry, description, category) texinfo_documents = [ - (master_doc, 'AdafruitDisplay_ButtonLibrary', u'Adafruit Display_Button Library Documentation', - author, 'AdafruitDisplay_ButtonLibrary', 'One line description of project.', - 'Miscellaneous'), + ( + master_doc, + "AdafruitDisplay_ButtonLibrary", + u"Adafruit Display_Button Library Documentation", + author, + "AdafruitDisplay_ButtonLibrary", + "One line description of project.", + "Miscellaneous", + ), ] diff --git a/examples/display_button_customfont.py b/examples/display_button_customfont.py index 2bb2999..1c6d5aa 100644 --- a/examples/display_button_customfont.py +++ b/examples/display_button_customfont.py @@ -7,17 +7,24 @@ # These pins are used as both analog and digital! XL, XR and YU must be analog # and digital capable. YD just need to be digital -ts = adafruit_touchscreen.Touchscreen(board.TOUCH_XL, board.TOUCH_XR, - board.TOUCH_YD, board.TOUCH_YU, - calibration=((5200, 59000), (5800, 57000)), - size=(320, 240)) +ts = adafruit_touchscreen.Touchscreen( + board.TOUCH_XL, + board.TOUCH_XR, + board.TOUCH_YD, + board.TOUCH_YU, + calibration=((5200, 59000), (5800, 57000)), + size=(320, 240), +) # the current working directory (where this file is) -cwd = ("/"+__file__).rsplit('/', 1)[0] -fonts = [file for file in os.listdir(cwd+"/fonts/") - if (file.endswith(".bdf") and not file.startswith("._"))] +cwd = ("/" + __file__).rsplit("/", 1)[0] +fonts = [ + file + for file in os.listdir(cwd + "/fonts/") + if (file.endswith(".bdf") and not file.startswith("._")) +] for i, filename in enumerate(fonts): - fonts[i] = cwd+"/fonts/"+filename + fonts[i] = cwd + "/fonts/" + filename print(fonts) THE_FONT = "/fonts/Arial-12.bdf" DISPLAY_STRING = "Button Text" @@ -35,9 +42,7 @@ color_bitmap = displayio.Bitmap(320, 240, 1) color_palette = displayio.Palette(1) color_palette[0] = 0x404040 -bg_sprite = displayio.TileGrid(color_bitmap, - pixel_shader=color_palette, - x=0, y=0) +bg_sprite = displayio.TileGrid(color_bitmap, pixel_shader=color_palette, x=0, y=0) print(bg_sprite.x, bg_sprite.y) splash.append(bg_sprite) @@ -48,47 +53,89 @@ buttons = [] # Default button styling: -button_0 = Button(x=BUTTON_MARGIN, y=BUTTON_MARGIN, - width=BUTTON_WIDTH, height=BUTTON_HEIGHT, - label="button0", label_font=font) +button_0 = Button( + x=BUTTON_MARGIN, + y=BUTTON_MARGIN, + width=BUTTON_WIDTH, + height=BUTTON_HEIGHT, + label="button0", + label_font=font, +) buttons.append(button_0) # a button with no indicators at all -button_1 = Button(x=BUTTON_MARGIN*2+BUTTON_WIDTH, y=BUTTON_MARGIN, - width=BUTTON_WIDTH, height=BUTTON_HEIGHT, - fill_color=None, outline_color=None) +button_1 = Button( + x=BUTTON_MARGIN * 2 + BUTTON_WIDTH, + y=BUTTON_MARGIN, + width=BUTTON_WIDTH, + height=BUTTON_HEIGHT, + fill_color=None, + outline_color=None, +) buttons.append(button_1) # various colorings -button_2 = Button(x=BUTTON_MARGIN*3+2*BUTTON_WIDTH, y=BUTTON_MARGIN, - width=BUTTON_WIDTH, height=BUTTON_HEIGHT, - label="button2", label_font=font, label_color=0x0000FF, - fill_color=0x00FF00, outline_color=0xFF0000) +button_2 = Button( + x=BUTTON_MARGIN * 3 + 2 * BUTTON_WIDTH, + y=BUTTON_MARGIN, + width=BUTTON_WIDTH, + height=BUTTON_HEIGHT, + label="button2", + label_font=font, + label_color=0x0000FF, + fill_color=0x00FF00, + outline_color=0xFF0000, +) buttons.append(button_2) # Transparent button with text -button_3 = Button(x=BUTTON_MARGIN, y=BUTTON_MARGIN*2+BUTTON_HEIGHT, - width=BUTTON_WIDTH, height=BUTTON_HEIGHT, - label="button3", label_font=font, label_color=0x0, - fill_color=None, outline_color=None) +button_3 = Button( + x=BUTTON_MARGIN, + y=BUTTON_MARGIN * 2 + BUTTON_HEIGHT, + width=BUTTON_WIDTH, + height=BUTTON_HEIGHT, + label="button3", + label_font=font, + label_color=0x0, + fill_color=None, + outline_color=None, +) buttons.append(button_3) # a roundrect -button_4 = Button(x=BUTTON_MARGIN*2+BUTTON_WIDTH, y=BUTTON_MARGIN*2+BUTTON_HEIGHT, - width=BUTTON_WIDTH, height=BUTTON_HEIGHT, - label="button4", label_font=font, style=Button.ROUNDRECT) +button_4 = Button( + x=BUTTON_MARGIN * 2 + BUTTON_WIDTH, + y=BUTTON_MARGIN * 2 + BUTTON_HEIGHT, + width=BUTTON_WIDTH, + height=BUTTON_HEIGHT, + label="button4", + label_font=font, + style=Button.ROUNDRECT, +) buttons.append(button_4) # a shadowrect -button_5 = Button(x=BUTTON_MARGIN*3+BUTTON_WIDTH*2, y=BUTTON_MARGIN*2+BUTTON_HEIGHT, - width=BUTTON_WIDTH, height=BUTTON_HEIGHT, - label="button5", label_font=font, style=Button.SHADOWRECT) +button_5 = Button( + x=BUTTON_MARGIN * 3 + BUTTON_WIDTH * 2, + y=BUTTON_MARGIN * 2 + BUTTON_HEIGHT, + width=BUTTON_WIDTH, + height=BUTTON_HEIGHT, + label="button5", + label_font=font, + style=Button.SHADOWRECT, +) buttons.append(button_5) # a shadowroundrect -button_6 = Button(x=BUTTON_MARGIN, y=BUTTON_MARGIN*3+BUTTON_HEIGHT*2, - width=BUTTON_WIDTH, height=BUTTON_HEIGHT, - label="button6", label_font=font, style=Button.SHADOWROUNDRECT) +button_6 = Button( + x=BUTTON_MARGIN, + y=BUTTON_MARGIN * 3 + BUTTON_HEIGHT * 2, + width=BUTTON_WIDTH, + height=BUTTON_HEIGHT, + label="button6", + label_font=font, + style=Button.SHADOWROUNDRECT, +) buttons.append(button_6) for b in buttons: diff --git a/examples/display_button_simpletest.py b/examples/display_button_simpletest.py index 4828188..4db6e28 100644 --- a/examples/display_button_simpletest.py +++ b/examples/display_button_simpletest.py @@ -4,7 +4,7 @@ from adafruit_button import Button import adafruit_touchscreen -#--| Button Config |------------------------------------------------- +# --| Button Config |------------------------------------------------- BUTTON_X = 110 BUTTON_Y = 95 BUTTON_WIDTH = 100 @@ -14,23 +14,35 @@ BUTTON_OUTLINE_COLOR = 0xFF00FF BUTTON_LABEL = "HELLO WORLD" BUTTON_LABEL_COLOR = 0x000000 -#--| Button Config |------------------------------------------------- +# --| Button Config |------------------------------------------------- # Setup touchscreen (PyPortal) -ts = adafruit_touchscreen.Touchscreen(board.TOUCH_XL, board.TOUCH_XR, - board.TOUCH_YD, board.TOUCH_YU, - calibration=((5200, 59000), (5800, 57000)), - size=(320, 240)) +ts = adafruit_touchscreen.Touchscreen( + board.TOUCH_XL, + board.TOUCH_XR, + board.TOUCH_YD, + board.TOUCH_YU, + calibration=((5200, 59000), (5800, 57000)), + size=(320, 240), +) # Make the display context splash = displayio.Group() board.DISPLAY.show(splash) # Make the button -button = Button(x=BUTTON_X, y=BUTTON_Y, - width=BUTTON_WIDTH, height=BUTTON_HEIGHT, style=BUTTON_STYLE, - fill_color=BUTTON_FILL_COLOR, outline_color=BUTTON_OUTLINE_COLOR, - label="HELLO WORLD", label_font=terminalio.FONT, label_color=BUTTON_LABEL_COLOR) +button = Button( + x=BUTTON_X, + y=BUTTON_Y, + width=BUTTON_WIDTH, + height=BUTTON_HEIGHT, + style=BUTTON_STYLE, + fill_color=BUTTON_FILL_COLOR, + outline_color=BUTTON_OUTLINE_COLOR, + label="HELLO WORLD", + label_font=terminalio.FONT, + label_color=BUTTON_LABEL_COLOR, +) # Add button to the display context splash.append(button.group) diff --git a/examples/display_button_soundboard.py b/examples/display_button_soundboard.py index 340b3ff..de2ec36 100644 --- a/examples/display_button_soundboard.py +++ b/examples/display_button_soundboard.py @@ -5,23 +5,23 @@ SHOW_BUTTONS = False # the current working directory (where this file is) -cwd = ("/"+__file__).rsplit('/', 1)[0] +cwd = ("/" + __file__).rsplit("/", 1)[0] # No internet use version of pyportal -pyportal = PyPortal(default_bg=cwd+"/button_background.bmp") +pyportal = PyPortal(default_bg=cwd + "/button_background.bmp") spots = [] -spots.append({'label': "1", 'pos': (10, 10), 'size': (60, 60), 'file': "01.wav"}) -spots.append({'label': "2", 'pos': (90, 10), 'size': (60, 60), 'file': "02.wav"}) -spots.append({'label': "3", 'pos': (170, 10), 'size': (60, 60), 'file': "03.wav"}) -spots.append({'label': "4", 'pos': (250, 10), 'size': (60, 60), 'file': "04.wav"}) -spots.append({'label': "5", 'pos': (10, 90), 'size': (60, 60), 'file': "05.wav"}) -spots.append({'label': "6", 'pos': (90, 90), 'size': (60, 60), 'file': "06.wav"}) -spots.append({'label': "7", 'pos': (170, 90), 'size': (60, 60), 'file': "07.wav"}) -spots.append({'label': "8", 'pos': (250, 90), 'size': (60, 60), 'file': "08.wav"}) -spots.append({'label': "9", 'pos': (10, 170), 'size': (60, 60), 'file': "09.wav"}) -spots.append({'label': "10", 'pos': (90, 170), 'size': (60, 60), 'file': "10.wav"}) -spots.append({'label': "11", 'pos': (170, 170), 'size': (60, 60), 'file': "11.wav"}) -spots.append({'label': "12", 'pos': (250, 170), 'size': (60, 60), 'file': "12.wav"}) +spots.append({"label": "1", "pos": (10, 10), "size": (60, 60), "file": "01.wav"}) +spots.append({"label": "2", "pos": (90, 10), "size": (60, 60), "file": "02.wav"}) +spots.append({"label": "3", "pos": (170, 10), "size": (60, 60), "file": "03.wav"}) +spots.append({"label": "4", "pos": (250, 10), "size": (60, 60), "file": "04.wav"}) +spots.append({"label": "5", "pos": (10, 90), "size": (60, 60), "file": "05.wav"}) +spots.append({"label": "6", "pos": (90, 90), "size": (60, 60), "file": "06.wav"}) +spots.append({"label": "7", "pos": (170, 90), "size": (60, 60), "file": "07.wav"}) +spots.append({"label": "8", "pos": (250, 90), "size": (60, 60), "file": "08.wav"}) +spots.append({"label": "9", "pos": (10, 170), "size": (60, 60), "file": "09.wav"}) +spots.append({"label": "10", "pos": (90, 170), "size": (60, 60), "file": "10.wav"}) +spots.append({"label": "11", "pos": (170, 170), "size": (60, 60), "file": "11.wav"}) +spots.append({"label": "12", "pos": (250, 170), "size": (60, 60), "file": "12.wav"}) buttons = [] for spot in spots: @@ -29,11 +29,17 @@ if SHOW_BUTTONS: fill = None outline = 0x00FF00 - button = Button(x=spot['pos'][0], y=spot['pos'][1], - width=spot['size'][0], height=spot['size'][1], - fill_color=fill, outline_color=outline, - label=spot['label'], label_color=None, - name=spot['file']) + button = Button( + x=spot["pos"][0], + y=spot["pos"][1], + width=spot["size"][0], + height=spot["size"][1], + fill_color=fill, + outline_color=outline, + label=spot["label"], + label_color=None, + name=spot["file"], + ) pyportal.splash.append(button.group) buttons.append(button) @@ -46,9 +52,8 @@ for b in buttons: if b.contains(p): print("Touched", b.name) - if currently_pressed != b: # don't restart if playing - pyportal.play_file(cwd + "/" + b.name, - wait_to_finish=False) + if currently_pressed != b: # don't restart if playing + pyportal.play_file(cwd + "/" + b.name, wait_to_finish=False) currently_pressed = b break else: diff --git a/setup.py b/setup.py index 0fab7fc..6d788de 100644 --- a/setup.py +++ b/setup.py @@ -6,6 +6,7 @@ """ from setuptools import setup, find_packages + # To use a consistent encoding from codecs import open from os import path @@ -13,51 +14,40 @@ here = path.abspath(path.dirname(__file__)) # Get the long description from the README file -with open(path.join(here, 'README.rst'), encoding='utf-8') as f: +with open(path.join(here, "README.rst"), encoding="utf-8") as f: long_description = f.read() setup( - name='adafruit-circuitpython-display_button', - + name="adafruit-circuitpython-display_button", use_scm_version=True, - setup_requires=['setuptools_scm'], - - description='UI Buttons for displayio', + setup_requires=["setuptools_scm"], + description="UI Buttons for displayio", long_description=long_description, - long_description_content_type='text/x-rst', - + long_description_content_type="text/x-rst", # The project's main homepage. - url='https://github.com/adafruit/Adafruit_CircuitPython_Display_Button', - + url="https://github.com/adafruit/Adafruit_CircuitPython_Display_Button", # Author details - author='Adafruit Industries', - author_email='circuitpython@adafruit.com', - - install_requires=[ - 'Adafruit-Blinka' - ], - + author="Adafruit Industries", + author_email="circuitpython@adafruit.com", + install_requires=["Adafruit-Blinka"], # Choose your license - license='MIT', - + license="MIT", # See https://pypi.python.org/pypi?%3Aaction=list_classifiers classifiers=[ - 'Development Status :: 3 - Alpha', - 'Intended Audience :: Developers', - 'Topic :: Software Development :: Libraries', - 'Topic :: System :: Hardware', - 'License :: OSI Approved :: MIT License', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.4', - 'Programming Language :: Python :: 3.5', + "Development Status :: 3 - Alpha", + "Intended Audience :: Developers", + "Topic :: Software Development :: Libraries", + "Topic :: System :: Hardware", + "License :: OSI Approved :: MIT License", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.4", + "Programming Language :: Python :: 3.5", ], - # What does your project relate to? - keywords='adafruit blinka circuitpython micropython display_button buttons UI', - + keywords="adafruit blinka circuitpython micropython display_button buttons UI", # You can just specify the packages manually here if your project is # simple. Or you can use find_packages(). # TODO: IF LIBRARY FILES ARE A PACKAGE FOLDER, # CHANGE `py_modules=['...']` TO `packages=['...']` - py_modules=['adafruit_display_button'], + py_modules=["adafruit_display_button"], )