]> Repositories - hackapet/Adafruit_Blinka_Displayio.git/commitdiff
Use latest version of black
authorMelissa LeBlanc-Williams <melissa@adafruit.com>
Mon, 15 Feb 2021 16:46:51 +0000 (08:46 -0800)
committerMelissa LeBlanc-Williams <melissa@adafruit.com>
Mon, 15 Feb 2021 16:46:51 +0000 (08:46 -0800)
.github/workflows/build.yml
displayio/fourwire.py
displayio/tilegrid.py
setup.py

index 0ba1c3ff35b6192a06fd84b522182c7d49fd5904..2582867ba777701eabcf19c888d4c5a68f3c50a7 100644 (file)
@@ -36,7 +36,7 @@ jobs:
         source actions-ci/install.sh
     - name: Pip install pylint, black, & Sphinx
       run: |
-        pip install --force-reinstall pylint black==19.10b0 Sphinx sphinx-rtd-theme
+        pip install --force-reinstall pylint black Sphinx sphinx-rtd-theme
     - name: Library version
       run: git describe --dirty --always --tags
     - name: Check formatting
index 64be5c87dddb4739369f272fd9258231743fbf94..219656ca77f5ee4cef8df18f4778fc329526030e 100644 (file)
@@ -116,8 +116,7 @@ class FourWire:
             self._spi.write(data)
 
     def begin_transaction(self):
-        """Begin the SPI transaction by locking, configuring, and setting Chip Select
-        """
+        """Begin the SPI transaction by locking, configuring, and setting Chip Select"""
         while not self._spi.try_lock():
             pass
         self._spi.configure(
@@ -126,7 +125,6 @@ class FourWire:
         self._chip_select.value = False
 
     def end_transaction(self):
-        """End the SPI transaction by unlocking and setting Chip Select
-        """
+        """End the SPI transaction by unlocking and setting Chip Select"""
         self._chip_select.value = True
         self._spi.unlock()
index 58062531d98a2cf649ea16f471d717c87464fd67..548e4569bfe1fe6777b29f370ff6f77e057344c0 100644 (file)
@@ -243,7 +243,9 @@ class TileGrid:
         tile_count_x = bitmap_width // tile_width
 
         image = Image.new(
-            "RGBA", (width * tile_width, height * tile_height), (0, 0, 0, 0),
+            "RGBA",
+            (width * tile_width, height * tile_height),
+            (0, 0, 0, 0),
         )
 
         for tile_x in range(width):
@@ -263,7 +265,10 @@ class TileGrid:
                 image.alpha_composite(
                     tile_image,
                     dest=(tile_x * tile_width, tile_y * tile_height),
-                    source=(tile_index_x * tile_width, tile_index_y * tile_height,),
+                    source=(
+                        tile_index_x * tile_width,
+                        tile_index_y * tile_height,
+                    ),
                 )
 
         if absolute_transform is not None:
index 4070f703522cfc54c73d5378ccfe8542991d8453..0a8fc6b39539df394f427b797e0d1138a4de390a 100644 (file)
--- a/setup.py
+++ b/setup.py
@@ -29,7 +29,12 @@ setup(
     # Author details
     author="Adafruit Industries",
     author_email="circuitpython@adafruit.com",
-    install_requires=["Adafruit-Blinka", "pillow", "numpy", "recordclass",],
+    install_requires=[
+        "Adafruit-Blinka",
+        "pillow",
+        "numpy",
+        "recordclass",
+    ],
     # Choose your license
     license="MIT",
     # See https://pypi.python.org/pypi?%3Aaction=list_classifiers