Skip to content

Incorrect keyword parameters are ignored, and do not cause errors. #146

Closed
@kmatch98

Description

@kmatch98

When creating labels, incorrect input parameters are ignored and do not cause any errors. This will cause confusion if users type the wrong keyword name and nothing happens (like happened with me when I used background instead of background_color).

I added a "random_argument" to the simpletest and it does not cause any errors. Not a huge deal but it can prevent users from realizing their errors.

import board
import terminalio
from adafruit_display_text import bitmap_label


text = "Hello world"
text_area = bitmap_label.Label(terminalio.FONT, text=text, random_argument=42)
text_area.x = 10
text_area.y = 10
board.DISPLAY.show(text_area)
while True:
    pass

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions