Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit db3d9e5

Browse files
committedDec 1, 2024·
Black formatting
Ran against local installation of black after correcting my own config.
1 parent a3ba721 commit db3d9e5

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed
 

‎adafruit_button/button.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -144,13 +144,13 @@ def __init__(
144144
width: int,
145145
height: int,
146146
name: Optional[str] = None,
147-
style = RECT,
147+
style=RECT,
148148
fill_color: Optional[Union[int, Tuple[int, int, int]]] = 0xFFFFFF,
149149
outline_color: Optional[Union[int, Tuple[int, int, int]]] = 0x0,
150150
label: Optional[str] = None,
151151
label_font: Optional[FontProtocol] = None,
152-
label_color: Optional[Union[int, Tuple[int, int , int]]] = 0x0,
153-
selected_fill: Optional[Union[int, Tuple[int, int , int]]] = None,
152+
label_color: Optional[Union[int, Tuple[int, int, int]]] = 0x0,
153+
selected_fill: Optional[Union[int, Tuple[int, int, int]]] = None,
154154
selected_outline: Optional[Union[int, Tuple[int, int, int]]] = None,
155155
selected_label: Optional[Union[int, Tuple[int, int, int]]] = None,
156156
label_scale: Optional[int] = 1
@@ -303,4 +303,4 @@ def resize(self, new_width: int, new_height: int) -> None:
303303
self._create_body()
304304
if self.body:
305305
self.append(self.body)
306-
self.label = self.label
306+
self.label = self.label

‎adafruit_button/button_base.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
from adafruit_display_text.bitmap_label import Label
2525
from displayio import Group
2626
import terminalio
27+
2728
try:
2829
from typing import Optional, Union, Tuple, Any
2930
from fontio import FontProtocol
@@ -169,4 +170,4 @@ def label_color(self) -> int:
169170
@label_color.setter
170171
def label_color(self, new_color: Union[int, Tuple[int, int, int]]) -> None:
171172
self._label_color = _check_color(new_color)
172-
self._label.color = self._label_color
173+
self._label.color = self._label_color

‎adafruit_button/sprite_button.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
except ImportError:
3232
pass
3333

34+
3435
class SpriteButton(ButtonBase):
3536
"""Helper class for creating 3x3 Bitmap Spritesheet UI buttons for ``displayio``.
3637
Compatible with any format supported by ''adafruit_imageload''.
@@ -142,4 +143,4 @@ def _subclass_selected_behavior(self, value: Optional[Any]) -> None:
142143
self._btn_tilegrid.pixel_shader = self._selected_bmp_palette
143144
else:
144145
self._btn_tilegrid.bitmap = self._bmp
145-
self._btn_tilegrid.pixel_shader = self._bmp_palette
146+
self._btn_tilegrid.pixel_shader = self._bmp_palette

0 commit comments

Comments
 (0)
Please sign in to comment.