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
Add missing type hints #1720
base: development
Are you sure you want to change the base?
Add missing type hints #1720
Conversation
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.
This is already getting to be a somewhat large PR. I'd turn this change into a separate PR as there may be additional changes related to the ticket.
Pyglet doesn't have __slots__ so I didn't know all the variables
I'll keep those in becuase I don't know how to roll them back, but I'll put anything more into a different PR. |
This should have the latest development branch merged into it. Looking at the remaining errors:
@pushfoo On The correct return type annotation is thus
Can be solved by adding
This class of error is suppressed in our pyright config, so I'm not sure how we want to handle this. Turn off mypy? Turn off |
Understood & agreed.
It's
Even if we don't replace this class and think it's useful,
I'm not sure either. The |
I added that for now. |
Still assuming this is a WIP |
for i in range(len(point_list) - 1): | ||
point1 = point_list[i] | ||
point2 = point_list[i + 1] | ||
|
||
points = get_points_for_thick_line(point1[0], point1[1], point2[0], point2[1], line_width) | ||
triangle_point_list.extend([points[1], points[0], points[2], points[3]]) | ||
|
||
# Handle the last segment (connecting back to the start) | ||
point1 = point_list[-1] | ||
point2 = point_list[0] | ||
points = get_points_for_thick_line(point1[0], point1[1], point2[0], point2[1], line_width) | ||
triangle_point_list.extend([points[1], points[0], points[2], points[3]]) |
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.
- Why is this in a type hint PR?
- Do we have unit tests covering these changes?
If this is a needed improvement. If it works, this should be in another, separate PR.
Can not be merged right now, I changed it to be a draft. |
Ready to merge. @einarf the errors are either things like variable types undeclared or something I need help on. So pls review. Look at the windows test for the weird error I do not get.