Skip to content

pybricks.parameters: color.__hash__ value alignment #175

Open

Description

@kai-morich
from pybricks.parameters import Color
a = Color.RED
b = Color(a.h, a.s, a.v)
print(a, b, a==b)

On a pybricks device the above snippet printed

Color.RED Color(h=0, s=100, v=100) True

On a PC with pybricks stubs it printed

Color(h=0, s=100, v=100) Color(h=0, s=100, v=100) True

The linked PR aligns the behavior.

This makes analysis of color handling code much easier as names are now printed.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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