Skip to content

Commit 5f64550

Browse files
authored
Merge pull request #9 from tekktrik/dev/update-signature
Change signature to match builtin
2 parents dafbe8b + b1af6b5 commit 5f64550

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

adafruit_pixelbuf.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@ class PixelBuf: # pylint: disable=too-many-instance-attributes
4444

4545
def __init__( # pylint: disable=too-many-locals,too-many-arguments
4646
self,
47-
n: int,
47+
size: int,
48+
*,
4849
byteorder: str = "BGR",
4950
brightness: float = 1.0,
5051
auto_write: bool = False,
@@ -57,7 +58,7 @@ def __init__( # pylint: disable=too-many-locals,too-many-arguments
5758
self.auto_write = False
5859

5960
effective_bpp = 4 if dotstar_mode else bpp
60-
_bytes = effective_bpp * n
61+
_bytes = effective_bpp * size
6162
buf = bytearray(_bytes)
6263
offset = 0
6364

@@ -72,7 +73,7 @@ def __init__( # pylint: disable=too-many-locals,too-many-arguments
7273
raise TypeError("trailer must be a bytearray")
7374
buf += trailer
7475

75-
self._pixels = n
76+
self._pixels = size
7677
self._bytes = _bytes
7778
self._byteorder = byteorder_tuple
7879
self._byteorder_string = byteorder

0 commit comments

Comments
 (0)