Skip to content

Commit d1918e4

Browse files
committed
remove pylint disables
1 parent 6664962 commit d1918e4

18 files changed

+68
-80
lines changed

adafruit_epd/ek79686.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
try:
2020
"Needed for type annotations"
21-
import typing # pylint: disable=unused-import
21+
import typing
2222

2323
from busio import SPI
2424
from digitalio import DigitalInOut
@@ -59,7 +59,6 @@
5959
class Adafruit_EK79686(Adafruit_EPD):
6060
"""driver class for Adafruit EK79686 ePaper display breakouts"""
6161

62-
# pylint: disable=too-many-arguments
6362
def __init__(
6463
self,
6564
width: int,

adafruit_epd/epd.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
CircuitPython driver for Adafruit ePaper display breakouts
99
* Author(s): Dean Miller
1010
"""
11-
# pylint: disable=ungrouped-imports
1211

1312
import time
1413

@@ -33,7 +32,7 @@
3332
__repo__ = "https://github.com/adafruit/Adafruit_CircuitPython_EPD.git"
3433

3534

36-
class Adafruit_EPD: # pylint: disable=too-many-instance-attributes, too-many-public-methods, too-many-arguments
35+
class Adafruit_EPD:
3736
"""Base class for EPD displays"""
3837

3938
BLACK = const(0)
@@ -53,7 +52,7 @@ def __init__(
5352
sramcs_pin: DigitalInOut,
5453
rst_pin: DigitalInOut,
5554
busy_pin: DigitalInOut,
56-
) -> None: # pylint: disable=too-many-arguments
55+
) -> None:
5756
self._width = width
5857
self._height = height
5958

@@ -99,7 +98,7 @@ def __init__(
9998
self._black_inverted = self._color_inverted = True
10099
self.hardware_reset()
101100

102-
def display(self) -> None: # pylint: disable=too-many-branches
101+
def display(self) -> None:
103102
"""show the contents of the display buffer"""
104103
self.power_up()
105104

@@ -298,15 +297,15 @@ def fill(self, color: int) -> None:
298297
self._blackframebuf.fill(black_fill)
299298
self._colorframebuf.fill(red_fill)
300299

301-
def rect(self, x: int, y: int, width: int, height: int, color: int) -> None: # pylint: disable=too-many-arguments
300+
def rect(self, x: int, y: int, width: int, height: int, color: int) -> None:
302301
"""draw a rectangle"""
303302
self._color_dup("rect", (x, y, width, height), color)
304303

305-
def fill_rect(self, x: int, y: int, width: int, height: int, color: int) -> None: # pylint: disable=too-many-arguments
304+
def fill_rect(self, x: int, y: int, width: int, height: int, color: int) -> None:
306305
"""fill a rectangle with the passed color"""
307306
self._color_dup("fill_rect", (x, y, width, height), color)
308307

309-
def line(self, x_0: int, y_0: int, x_1: int, y_1: int, color: int) -> None: # pylint: disable=too-many-arguments
308+
def line(self, x_0: int, y_0: int, x_1: int, y_1: int, color: int) -> None:
310309
"""Draw a line from (x_0, y_0) to (x_1, y_1) in passed color"""
311310
self._color_dup("line", (x_0, y_0, x_1, y_1), color)
312311

adafruit_epd/il0373.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
try:
2020
"""Needed for type annotations"""
21-
import typing # pylint: disable=unused-import
21+
import typing
2222

2323
from busio import SPI
2424
from digitalio import DigitalInOut
@@ -59,7 +59,6 @@
5959
class Adafruit_IL0373(Adafruit_EPD):
6060
"""driver class for Adafruit IL0373 ePaper display breakouts"""
6161

62-
# pylint: disable=too-many-arguments
6362
def __init__(
6463
self,
6564
width: int,

adafruit_epd/il0398.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
try:
2020
"""Needed for type annotations"""
21-
import typing # pylint: disable=unused-import
21+
import typing
2222

2323
from busio import SPI
2424
from digitalio import DigitalInOut
@@ -60,7 +60,6 @@
6060
class Adafruit_IL0398(Adafruit_EPD):
6161
"""driver class for Adafruit IL0373 ePaper display breakouts"""
6262

63-
# pylint: disable=too-many-arguments
6463
def __init__(
6564
self,
6665
width: int,

adafruit_epd/il91874.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
try:
2020
"Needed for type annotations"
21-
import typing # pylint: disable=unused-import
21+
import typing
2222

2323
from busio import SPI
2424
from digitalio import DigitalInOut
@@ -65,7 +65,6 @@
6565
class Adafruit_IL91874(Adafruit_EPD):
6666
"""driver class for Adafruit IL91874 ePaper display breakouts"""
6767

68-
# pylint: disable=too-many-arguments
6968
def __init__(
7069
self,
7170
width: int,

adafruit_epd/mcp_sram.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ def __init__(self, cs_pin: DigitalInOut, spi: SPI):
6161
self._buf[0] = Adafruit_MCP_SRAM.SRAM_WRSR
6262
self._buf[1] = 0x43
6363
with self._spi as spidev:
64-
spidev.write(self._buf, end=2) # pylint: disable=no-member
64+
spidev.write(self._buf, end=2)
6565

6666
def get_view(self, offset: int) -> Adafruit_MCP_SRAM_View:
6767
"""Create an object that can be used as a memoryview, with a given offset"""
@@ -74,8 +74,8 @@ def write(self, addr: int, buf: List, reg=SRAM_WRITE):
7474
self._buf[2] = addr & 0xFF
7575

7676
with self._spi as spi:
77-
spi.write(self._buf, end=3) # pylint: disable=no-member
78-
spi.write(bytearray(buf)) # pylint: disable=no-member
77+
spi.write(self._buf, end=3)
78+
spi.write(bytearray(buf))
7979

8080
def read(self, addr: int, length: int, reg: int = SRAM_READ):
8181
"""read passed number of bytes at the passed address"""
@@ -85,8 +85,8 @@ def read(self, addr: int, length: int, reg: int = SRAM_READ):
8585

8686
buf = bytearray(length)
8787
with self._spi as spi:
88-
spi.write(self._buf, end=3) # pylint: disable=no-member
89-
spi.readinto(buf) # pylint: disable=no-member
88+
spi.write(self._buf, end=3)
89+
spi.readinto(buf)
9090
return buf
9191

9292
def read8(self, addr: int, reg: int = SRAM_READ):
@@ -113,6 +113,6 @@ def erase(self, addr: int, length: int, value: Any):
113113
self._buf[2] = addr & 0xFF
114114
fill = bytearray([value])
115115
with self._spi as spi:
116-
spi.write(self._buf, end=3) # pylint: disable=no-member
116+
spi.write(self._buf, end=3)
117117
for _ in range(length):
118-
spi.write(fill) # pylint: disable=no-member
118+
spi.write(fill)

adafruit_epd/ssd1608.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
try:
2020
"""Needed for type annotations"""
21-
import typing # pylint: disable=unused-import
21+
import typing
2222

2323
from busio import SPI
2424
from digitalio import DigitalInOut
@@ -70,7 +70,6 @@
7070
class Adafruit_SSD1608(Adafruit_EPD):
7171
"""driver class for Adafruit SSD1608 ePaper display breakouts"""
7272

73-
# pylint: disable=too-many-arguments
7473
def __init__(
7574
self,
7675
width: int,

adafruit_epd/ssd1675.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
try:
2020
"""Needed for type annotations"""
21-
import typing # pylint: disable=unused-import
21+
import typing
2222

2323
from busio import SPI
2424
from digitalio import DigitalInOut
@@ -62,7 +62,6 @@
6262
class Adafruit_SSD1675(Adafruit_EPD):
6363
"""driver class for Adafruit SSD1675 ePaper display breakouts"""
6464

65-
# pylint: disable=too-many-arguments
6665
def __init__(
6766
self,
6867
width: int,

adafruit_epd/ssd1675b.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
try:
2020
"""Needed for type annotations"""
21-
import typing # pylint: disable=unused-import
21+
import typing
2222

2323
from busio import SPI
2424
from digitalio import DigitalInOut
@@ -88,7 +88,6 @@
8888
class Adafruit_SSD1675B(Adafruit_EPD):
8989
"""driver class for Adafruit SSD1675B ePaper display breakouts"""
9090

91-
# pylint: disable=too-many-arguments
9291
def __init__(
9392
self,
9493
width: int,

adafruit_epd/ssd1680.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
try:
2020
"""Needed for type annotations"""
21-
import typing # pylint: disable=unused-import
21+
import typing
2222

2323
from busio import SPI
2424
from digitalio import DigitalInOut
@@ -83,7 +83,6 @@
8383
class Adafruit_SSD1680(Adafruit_EPD):
8484
"""driver class for Adafruit SSD1680 ePaper display breakouts"""
8585

86-
# pylint: disable=too-many-arguments
8786
def __init__(
8887
self,
8988
width: int,
@@ -215,7 +214,6 @@ def set_ram_address(self, x: int, y: int) -> None: # noqa: PLR6301, F841
215214
class Adafruit_SSD1680Z(Adafruit_SSD1680):
216215
"""Driver for SSD1680Z ePaper display, overriding SSD1680 settings."""
217216

218-
# pylint: disable=too-many-arguments, useless-parent-delegation
219217
def __init__(self, width, height, spi, *, cs_pin, dc_pin, sramcs_pin, rst_pin, busy_pin):
220218
# Call the parent class's __init__() to initialize attributes
221219
super().__init__(

0 commit comments

Comments
 (0)