From: Melissa LeBlanc-Williams Date: Thu, 25 Jun 2020 21:54:23 +0000 (-0700) Subject: Fix black's misplacement of the pylint disable X-Git-Tag: 0.4.0^2~1 X-Git-Url: https://git.ayoreis.com/hackapet/Adafruit_Blinka_Displayio.git/commitdiff_plain/6cd5a377b719823e1812fb2d0a950ab9af246126 Fix black's misplacement of the pylint disable --- diff --git a/displayio/tilegrid.py b/displayio/tilegrid.py index 861384e..d5b3446 100644 --- a/displayio/tilegrid.py +++ b/displayio/tilegrid.py @@ -200,20 +200,20 @@ class TileGrid: def _apply_palette(self, image): if isinstance(self._pixel_shader, Palette): image.putpalette( - self._pixel_shader._get_palette() - ) # pylint: disable=protected-access + self._pixel_shader._get_palette() # pylint: disable=protected-access + ) if isinstance(self._pixel_shader, ColorConverter): # This will be needed for eInks, grayscale, and monochrome displays pass def _add_alpha(self, image): if isinstance(self._pixel_shader, Palette): - alpha = self._bitmap._image.copy().convert( + alpha = self._bitmap._image.copy().convert( # pylint: disable=protected-access "P" - ) # pylint: disable=protected-access + ) alpha.putpalette( - self._pixel_shader._get_alpha_palette() - ) # pylint: disable=protected-access + self._pixel_shader._get_alpha_palette() # pylint: disable=protected-access + ) image.putalpha(alpha.convert("L")) # pylint: disable=too-many-locals @@ -237,9 +237,9 @@ class TileGrid: tile_index = self._tiles[tile_y * self._width + tile_x] tile_index_x = tile_index % tile_count_x tile_index_y = tile_index // tile_count_x - tile_image = self._bitmap._image.copy().convert( + tile_image = self._bitmap._image.copy().convert( # pylint: disable=protected-access "P" - ) # pylint: disable=protected-access + ) self._apply_palette(tile_image) tile_image = tile_image.convert("RGBA") self._add_alpha(tile_image)