Skip to content

Add __repr__ and __str__ methods for improved BlinkStick representation#120

Merged
robberwick merged 1 commit intoarvydas:release/2.0-devfrom
robberwick:blinkstick-repr
Feb 16, 2025
Merged

Add __repr__ and __str__ methods for improved BlinkStick representation#120
robberwick merged 1 commit intoarvydas:release/2.0-devfrom
robberwick:blinkstick-repr

Conversation

@robberwick
Copy link
Collaborator

This pull request includes modifications to the src/blinkstick/clients/blinkstick.py file to enhance the string representation of the BlinkStick class. The most important changes involve adding __repr__ and __str__ methods to provide more informative and user-friendly descriptions of BlinkStick objects.

Enhancements to string representation:

  • Added __repr__ method to return a detailed string representation of the BlinkStick object, including its variant and serial number, or indicating that it is not connected.
  • Added __str__ method to return a simplified string representation of the BlinkStick object, including its variant and serial number, or indicating that it is not connected.

@robberwick robberwick requested a review from Copilot February 16, 2025 11:24
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 1 out of 1 changed files in this pull request and generated no comments.

@robberwick robberwick merged commit 3221a02 into arvydas:release/2.0-dev Feb 16, 2025
17 checks passed
@robberwick robberwick deleted the blinkstick-repr branch February 16, 2025 11:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants