diff --git a/adafruit_matrixportal/graphics.py b/adafruit_matrixportal/graphics.py index 59b6f4f..80be3c1 100755 --- a/adafruit_matrixportal/graphics.py +++ b/adafruit_matrixportal/graphics.py @@ -55,26 +55,11 @@ class Graphics(GraphicsBase): # pylint: disable=too-few-public-methods def __init__( self, - *, - default_bg=0x000000, - width=64, - height=32, - bit_depth=2, - alt_addr_pins=None, - color_order="RGB", - serpentine=True, - tile_rows=1, - debug=False + **kwargs, ): + default_bg = kwargs.pop("default_bg") + debug = kwargs.pop("debug") - matrix = Matrix( - bit_depth=bit_depth, - width=width, - height=height, - alt_addr_pins=alt_addr_pins, - color_order=color_order, - serpentine=serpentine, - tile_rows=tile_rows, - ) + matrix = Matrix(**kwargs) super().__init__(matrix.display, default_bg=default_bg, debug=debug) diff --git a/adafruit_matrixportal/network.py b/adafruit_matrixportal/network.py index de71ee9..c06f41f 100755 --- a/adafruit_matrixportal/network.py +++ b/adafruit_matrixportal/network.py @@ -48,19 +48,15 @@ class Network(NetworkBase): """ - def __init__( - self, - *, - status_neopixel=None, - esp=None, - external_spi=None, - extract_values=True, - debug=False, - ): - wifi = WiFi(status_neopixel=status_neopixel, esp=esp, external_spi=external_spi) + def __init__(self, **kwargs): + extract_values = kwargs.pop("extract_values") + debug = kwargs.pop("debug") + wifi = WiFi(**kwargs) super().__init__( - wifi, extract_values=extract_values, debug=debug, + wifi, + extract_values=extract_values, + debug=debug, ) gc.collect() diff --git a/examples/matrixportal_scrolling_bitcoin.py b/examples/matrixportal_scrolling_bitcoin.py index 8f90d5a..9783c14 100644 --- a/examples/matrixportal_scrolling_bitcoin.py +++ b/examples/matrixportal_scrolling_bitcoin.py @@ -30,7 +30,9 @@ def text_transform(val): cwd = ("/" + __file__).rsplit("/", 1)[0] matrixportal = MatrixPortal( - url=DATA_SOURCE, json_path=DATA_LOCATION, status_neopixel=board.NEOPIXEL, + url=DATA_SOURCE, + json_path=DATA_LOCATION, + status_neopixel=board.NEOPIXEL, ) matrixportal.add_text( diff --git a/examples/matrixportal_simpletest.py b/examples/matrixportal_simpletest.py index 4d3cc53..9938cb2 100644 --- a/examples/matrixportal_simpletest.py +++ b/examples/matrixportal_simpletest.py @@ -30,7 +30,9 @@ def text_transform(val): cwd = ("/" + __file__).rsplit("/", 1)[0] matrixportal = MatrixPortal( - url=DATA_SOURCE, json_path=DATA_LOCATION, status_neopixel=board.NEOPIXEL, + url=DATA_SOURCE, + json_path=DATA_LOCATION, + status_neopixel=board.NEOPIXEL, ) matrixportal.add_text(