We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 23c5529 + 8039204 commit 3221a02Copy full SHA for 3221a02
src/blinkstick/clients/blinkstick.py
@@ -78,6 +78,22 @@ def wrapper(*args, **kwargs):
78
return wrapper
79
return attr
80
81
+ def __repr__(self):
82
+ try:
83
+ serial = self.get_serial()
84
+ variant = self.get_variant().description
85
+ except NotConnected:
86
+ return "<BlinkStick: Not connected>"
87
+ return f"<BlinkStick: Variant={variant} Serial={serial}>"
88
+
89
+ def __str__(self):
90
91
92
93
94
+ return "Blinkstick - Not connected"
95
+ return f"{variant} ({serial})"
96
97
def get_serial(self) -> str:
98
"""
99
Returns the serial number of backend.::
0 commit comments