diff --git a/adafruit_pixelbuf.py b/adafruit_pixelbuf.py index 8db9bf6..2ba7262 100644 --- a/adafruit_pixelbuf.py +++ b/adafruit_pixelbuf.py @@ -44,7 +44,8 @@ class PixelBuf: # pylint: disable=too-many-instance-attributes def __init__( # pylint: disable=too-many-locals,too-many-arguments self, - n: int, + size: int, + *, byteorder: str = "BGR", brightness: float = 1.0, auto_write: bool = False, @@ -57,7 +58,7 @@ def __init__( # pylint: disable=too-many-locals,too-many-arguments self.auto_write = False effective_bpp = 4 if dotstar_mode else bpp - _bytes = effective_bpp * n + _bytes = effective_bpp * size buf = bytearray(_bytes) offset = 0 @@ -72,7 +73,7 @@ def __init__( # pylint: disable=too-many-locals,too-many-arguments raise TypeError("trailer must be a bytearray") buf += trailer - self._pixels = n + self._pixels = size self._bytes = _bytes self._byteorder = byteorder_tuple self._byteorder_string = byteorder