Add missing type hints - #1720
Conversation
pushfoo
left a comment
There was a problem hiding this comment.
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.
- 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. |
|
Thanks for the work on this, but this is sadly not possible to merge at this time. I manually salvaged and merged this branch in: #2143 |
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.