Skip to content

Commit 2304e3a

Browse files
committed
Reformatted.
1 parent f08e364 commit 2304e3a

File tree

1 file changed

+13
-8
lines changed

1 file changed

+13
-8
lines changed

adafruit_st7789.py

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@
4848
from fourwire import FourWire
4949
except ImportError:
5050
pass
51-
5251
__version__ = "0.0.0+auto.0"
5352
__repo__ = "https://github.com/adafruit/Adafruit_CircuitPython_ST7789.git"
5453

@@ -65,19 +64,25 @@
6564
# pylint: disable=too-few-public-methods
6665
class ST7789(BusDisplay):
6766
"""
68-
ST7789 driver
69-
70-
:param FourWire bus: bus that the display is connected to
67+
ST7789 driver
68+
69+
:param FourWire bus: bus that the display is connected to
7170
:param bool bgr: (Optional) An extra init sequence to append (default=True)
7271
:param bool invert: (Optional) Invert the colors (default=True)
7372
"""
7473

75-
def __init__(self, bus: FourWire, *, bgr: bool = True, invert: bool = True, **kwargs: Any):
74+
def __init__(
75+
self, bus: FourWire, *, bgr: bool = True, invert: bool = True, **kwargs: Any
76+
):
7677
init_sequence = _INIT_SEQUENCE
7778
if bgr:
78-
init_sequence += b"\x36\x01\xc0" # _MADCTL Default rotation plus BGR encoding
79+
init_sequence += (
80+
b"\x36\x01\xc0" # _MADCTL Default rotation plus BGR encoding
81+
)
7982
else:
80-
init_sequence += b"\x36\x01\xc8" # _MADCTL Default rotation plus RGB encoding
83+
init_sequence += (
84+
b"\x36\x01\xc8" # _MADCTL Default rotation plus RGB encoding
85+
)
8186
if invert:
8287
init_sequence += b"\x21\x00" # _INVON
83-
super().__init__(bus, init_sequence, **kwargs)
88+
super().__init__(bus, init_sequence, **kwargs)

0 commit comments

Comments
 (0)