X-Git-Url: https://git.ayoreis.com/hackapet/Adafruit_Blinka_Displayio.git/blobdiff_plain/255ac2d73d09bc445dd3522b3b30f861552ccbe4..622133713388c31604224bd5b5b758a28b3cf4b0:/displayio/_i2cdisplay.py diff --git a/displayio/_i2cdisplay.py b/displayio/_i2cdisplay.py index 42f85ec..b5de381 100644 --- a/displayio/_i2cdisplay.py +++ b/displayio/_i2cdisplay.py @@ -53,6 +53,14 @@ class I2CDisplay: self._i2c = i2c_bus self._dev_addr = device_address + def __new__(cls, *args, **kwargs): + from . import ( # pylint: disable=import-outside-toplevel, cyclic-import + allocate_display_bus, + ) + + allocate_display_bus(cls) + return super().__new__(cls) + def _release(self): self.reset() self._i2c.deinit()