]> Repositories - hackapet/Adafruit_Blinka_Displayio.git/blobdiff - displayio/_fourwire.py
Switch to circuitpython_typing, remove _typing
[hackapet/Adafruit_Blinka_Displayio.git] / displayio / _fourwire.py
index 0aae5dad212a0239c5f26ae68414a05f13463b33..3d5fa7e99ff4f40f1e93f16dc2cfb888761336a1 100644 (file)
@@ -22,7 +22,7 @@ from typing import Optional
 import digitalio
 import busio
 import microcontroller
-import _typing
+import circuitpython_typing
 from ._constants import (
     CHIP_SELECT_TOGGLE_EVERY_BYTE,
     CHIP_SELECT_UNTOUCHED,
@@ -93,7 +93,11 @@ class FourWire:
             time.sleep(0.001)
 
     def send(
-        self, command, data: _typing.ReadableBuffer, *, toggle_every_byte: bool = False
+        self,
+        command,
+        data: circuitpython_typing.ReadableBuffer,
+        *,
+        toggle_every_byte: bool = False,
     ) -> None:
         """
         Sends the given command value followed by the full set of data. Display state,
@@ -112,7 +116,12 @@ class FourWire:
         self._send(DISPLAY_DATA, chip_select, data)
         self._end_transaction()
 
-    def _send(self, data_type: int, chip_select: int, data: _typing.ReadableBuffer):
+    def _send(
+        self,
+        data_type: int,
+        chip_select: int,
+        data: circuitpython_typing.ReadableBuffer,
+    ):
         self._dc.value = data_type == DISPLAY_DATA
         if chip_select == CHIP_SELECT_TOGGLE_EVERY_BYTE:
             for byte in data: