Skip to content

Change signature to match builtin #9

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Dec 13, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions adafruit_pixelbuf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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

Expand All @@ -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
Expand Down