3030class Adafruit_SSD1680 (Adafruit_EPD ):
3131 """Driver for SSD1680 ePaper display, default driver."""
3232
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+ ):
3537 # 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+ )
3741
3842 self .cs_pin = cs_pin
3943 self .dc_pin = dc_pin
@@ -42,7 +46,8 @@ def __init__(self, width, height, spi, *, cs_pin, dc_pin, sramcs_pin, rst_pin, b
4246 self .busy_pin = busy_pin
4347
4448 self .initialize_buffers (width , height )
45- # pylint: enable=too-many-arguments
49+ # pylint: enable=too-many-arguments, useless-parent-delegation
50+
4651
4752 def initialize_buffers (self , width , height ):
4853 """Initialize width height stride buffers"""
@@ -101,8 +106,9 @@ def write_ram(self, index):
101106 return self .command (_SSD1680_WRITE_BWRAM , end = False )
102107 if index == 1 :
103108 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" )
106112
107113 def set_ram_address (self , x , y ):
108114 """Set RAM address location for SSD1680."""
@@ -125,12 +131,22 @@ def power_down(self):
125131class Adafruit_SSD1680Z (Adafruit_SSD1680 ):
126132 """Driver for SSD1680Z ePaper display, overriding SSD1680 settings."""
127133
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+ ):
130138 # 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
134150
135151 def power_up (self ):
136152 """Power up sequence specifically for SSD1680Z."""
0 commit comments