30
30
class Adafruit_SSD1680 (Adafruit_EPD ):
31
31
"""Driver for SSD1680 ePaper display, default driver."""
32
32
33
- # pylint: disable=too-many-arguments
34
- def __init__ (self , width , height , spi , * , cs_pin , dc_pin , sramcs_pin , rst_pin , busy_pin ):
33
+ # pylint: disable=too-many-arguments, useless-parent-delegation
34
+ def __init__ (
35
+ self , width , height , spi , * , cs_pin , dc_pin , sramcs_pin , rst_pin , busy_pin
36
+ ):
35
37
# Call parent class's __init__ to initialize sram and other attributes
36
- super ().__init__ (width , height , spi , cs_pin , dc_pin , sramcs_pin , rst_pin , busy_pin )
38
+ super ().__init__ (
39
+ width , height , spi , cs_pin , dc_pin , sramcs_pin , rst_pin , busy_pin
40
+ )
37
41
38
42
self .cs_pin = cs_pin
39
43
self .dc_pin = dc_pin
@@ -42,7 +46,8 @@ def __init__(self, width, height, spi, *, cs_pin, dc_pin, sramcs_pin, rst_pin, b
42
46
self .busy_pin = busy_pin
43
47
44
48
self .initialize_buffers (width , height )
45
- # pylint: enable=too-many-arguments
49
+ # pylint: enable=too-many-arguments, useless-parent-delegation
50
+
46
51
47
52
def initialize_buffers (self , width , height ):
48
53
"""Initialize width height stride buffers"""
@@ -101,8 +106,9 @@ def write_ram(self, index):
101
106
return self .command (_SSD1680_WRITE_BWRAM , end = False )
102
107
if index == 1 :
103
108
return self .command (_SSD1680_WRITE_REDRAM , end = False )
104
- else :
105
- raise RuntimeError ("RAM index must be 0 or 1" )
109
+
110
+ # Raise an error if the index is not 0 or 1
111
+ raise RuntimeError ("RAM index must be 0 or 1" )
106
112
107
113
def set_ram_address (self , x , y ):
108
114
"""Set RAM address location for SSD1680."""
@@ -125,12 +131,22 @@ def power_down(self):
125
131
class Adafruit_SSD1680Z (Adafruit_SSD1680 ):
126
132
"""Driver for SSD1680Z ePaper display, overriding SSD1680 settings."""
127
133
128
- # pylint: disable=too-many-arguments
129
- def __init__ (self , width , height , spi , * , cs_pin , dc_pin , sramcs_pin , rst_pin , busy_pin ):
134
+ # pylint: disable=too-many-arguments, useless-parent-delegation
135
+ def __init__ (
136
+ self , width , height , spi , * , cs_pin , dc_pin , sramcs_pin , rst_pin , busy_pin
137
+ ):
130
138
# Call the parent class's __init__() to initialize attributes
131
- super ().__init__ (width , height , spi , cs_pin = cs_pin , dc_pin = dc_pin ,
132
- sramcs_pin = sramcs_pin , rst_pin = rst_pin , busy_pin = busy_pin )
133
- # pylint: enable=too-many-arguments
139
+ super ().__init__ (
140
+ width ,
141
+ height ,
142
+ spi ,
143
+ cs_pin = cs_pin ,
144
+ dc_pin = dc_pin ,
145
+ sramcs_pin = sramcs_pin ,
146
+ rst_pin = rst_pin ,
147
+ busy_pin = busy_pin ,
148
+ )
149
+ # pylint: enable=too-many-arguments, useless-parent-delegation
134
150
135
151
def power_up (self ):
136
152
"""Power up sequence specifically for SSD1680Z."""
0 commit comments