Skip to content

Conversation

@hchargois
Copy link
Contributor

library/lcd was full of type hinting issues, which made the code light up like a (season-appropriate) Christmas tree in VSCode with Pylance 🎄

Screenshot_20241222-025215

The same issues can be reported on the command-line with Pyright.

I've fixed (almost) all typing issues. I tried to keep the logic bug-for-bug compatible; except for Colors where I had to change a few things, and I took the opportunity to improve the parsing and now colors can be specified in more ways.

Sorry for the big MR, but there were a lot of intricate changes and it would have been hard to split it.

The only remaining typing issues in library/lcd are now the RGB-serialization methods in lcd_comm_{b,c,d}, which I didn't try to fix as I may try porting them to numpy later anyway.

@mathoudebine
Copy link
Owner

Thanks for the cleanup! I did not see the hinting issues since I do not use Pyright.
If you have time to fix the conflicts let me know when it's done so I can run the CI tests on your branch. I will not modify this file anymore for now

@hchargois
Copy link
Contributor Author

@mathoudebine I've fixed the conflicts :)

@mathoudebine mathoudebine merged commit c48637c into mathoudebine:main Jan 6, 2025
41 checks passed
@hchargois hchargois deleted the fix-typing branch January 6, 2025 22:22
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