-
Notifications
You must be signed in to change notification settings - Fork 38
Type annotations in Display_text label library as a sample test for pylint and CI verifications #123
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…s greater thant string length
As discussed: @hugodahl. Thanks let me know if you need help with anything :). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just those two minor type-hint issues.
adafruit_display_text/label.py
Outdated
@@ -140,7 +140,7 @@ def __init__( | |||
if (anchored_position is not None) and (anchor_point is not None): | |||
self.anchored_position = anchored_position | |||
|
|||
def _create_background_box(self, lines, y_offset): | |||
def _create_background_box(self, lines: int, y_offset: int): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like one missed -> None
for the return type. All other locations already appear to have it added
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I miss that one, thanks for pointing that out!
@hugodahl Thanks for the revision I made all the changes as suggested thanks for catching those up!!! |
This PR was superseded by #134 the type hints were included in that PR. The Tab replacement fix code was included with #132 Thanks for working on this @jposada202020! |
As discussed during Saturday stream 2020-02-27 we want to include type annotations inside libraries code. Using this sample we want to verify CI behavior and possible solutions.