]> Repositories - hackapet/Adafruit_Blinka_Displayio.git/commitdiff
Make some internal functions protected
authorMelissa LeBlanc-Williams <melissa@adafruit.com>
Thu, 28 Sep 2023 21:50:48 +0000 (14:50 -0700)
committerMelissa LeBlanc-Williams <melissa@adafruit.com>
Thu, 28 Sep 2023 21:50:48 +0000 (14:50 -0700)
displayio/__init__.py
displayio/_display.py

index fad912245754a95d6d600a209f7882725a650986..55bb1d53a145621142f61d72c09dcbec6cbb8d58 100644 (file)
@@ -45,7 +45,7 @@ def _background():
     """Main thread function to loop through all displays and update them"""
     while True:
         for display in displays:
-            display.background()
+            display._background()  # pylint: disable=protected-access
 
 
 def release_displays() -> None:
@@ -55,7 +55,7 @@ def release_displays() -> None:
     initialization so the display is active as long as possible.
     """
     for display in displays:
-        display.release()
+        display._release()  # pylint: disable=protected-access
     displays.clear()
 
     for display_bus in display_buses:
index 2a6ea7b32779cf43db6c46f0b14b9d19dc4b8bf9..f2d02cfd4cadf90746aca796def6be7f44bba76d 100644 (file)
@@ -327,7 +327,7 @@ class Display:
             )
         return areas
 
-    def background(self):
+    def _background(self):
         """Run background refresh tasks. Do not call directly"""
         if (
             self._auto_refresh
@@ -427,12 +427,12 @@ class Display:
         self._core.fill_area(area, mask, buffer)
         return buffer
 
-    def release(self) -> None:
+    def _release(self) -> None:
         """Release the display and free its resources"""
         self.auto_refresh = False
         self._core.release_display_core()
 
-    def reset(self) -> None:
+    def _reset(self) -> None:
         """Reset the display"""
         self.auto_refresh = True
         circuitpython_splash.x = 0