Skip to content

Commit 3f7e3d7

Browse files
committed
Fixed type annotations in accordance with code review.
1 parent f8cab12 commit 3f7e3d7

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

adafruit_epd/mcp_sram.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,13 @@
1111

1212
from micropython import const
1313
from adafruit_bus_device import spi_device
14-
from digitalio import DigitalInOut # Needed for type annotation
15-
from busio import SPI # Needed for type annotation
14+
1615

1716
try:
17+
"""Needed for type annotations"""
1818
from typing import Any, List
19+
from digitalio import DigitalInOut
20+
from busio import SPI
1921
except ImportError:
2022
pass
2123

@@ -96,11 +98,11 @@ def read16(self, addr: int, reg: int = SRAM_READ):
9698
buf = self.read(addr, 2, reg)
9799
return buf[0] << 8 | buf[1]
98100

99-
def write8(self, addr: int, value: Any, reg: int = SRAM_WRITE):
101+
def write8(self, addr: int, value: int, reg: int = SRAM_WRITE):
100102
"""write a single byte at the passed address"""
101103
self.write(addr, [value], reg)
102104

103-
def write16(self, addr: int, value: Any, reg: int = SRAM_WRITE):
105+
def write16(self, addr: int, value: int, reg: int = SRAM_WRITE):
104106
"""write 2 bytes at the passed address"""
105107
self.write(addr, [value >> 8, value], reg)
106108

0 commit comments

Comments
 (0)