-
Notifications
You must be signed in to change notification settings - Fork 329
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
Address type issues #1751
Address type issues #1751
Conversation
Note to self: merge with #1720, check for conflicts and type errors. |
How would that work? |
I see that you are making some of the same improvements to types that I am; changing So I'm thinking we can somehow test your type changes against my improved pyright configuration, to see if they're compatible. Is that what you were asking? |
68919bc
to
c9e9df6
Compare
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.
I read through all files but in most gl parts I am unsure.
The changes for the GUI look good, especially if they work ;)
The |
operator should not be used due to the Python 3.10 requirement.
@pvcraven maybe it is time to move to pyright. |
That's fine by me. I'd started a while back fixing some things, glad to see some other people working on it. |
Yes, we don't want to use the | operator yet. It is awesome, I agree, but we still need python 3.9 compatibility. |
Cool, we'll see if @eruvanos has a sec to double check, but I think his concerns were addressed. |
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.
Thanks for the changes, from my point of view, all remaining changes (beside the asserts) look good.
Will merge as soon as they are replaced.
Again thank you for all your work!
I created pythonarcade/pytiled_parser#69 to track changes to type annotations in pytiled_parser which eliminate the need for |
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.
Great!
Mypy is unable to typecheck against pyglet and other deps that don't include a
py.typed
file. So it's unable to catch certain issues within arcade's own codebase. Pyright has an option telling it to use the source code ofpyglet
as types. I couldn't find an equivalent option for mypy.Yeah, some of the diagnostics are mere nuisances, unlikely to cause real problems. But some are legit.
This PR tweaks the pyright configuration and also makes minor changes to code to address some of the diagnostics. I'm not sure the best way to solicit feedback, ideally the GUI changes would be reviewed by someone familiar with the GUI code, etc.
I haven't fixed all the issues, but I want to pause this work till I get the team's temperature re: making these changes & enabling pyright on CI. I don't want to impose unwelcome work on the team.