-
Notifications
You must be signed in to change notification settings - Fork 344
Arcade should make its type hinting available to other modules via PEP 561 #533
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
Comments
Is this fixed now with the PR? |
Hm. It appears the PR got it further but it is not 100% working. If I install arcade 2.2.1, create a script named "test.py" that contains:
...and run mypy on it like this:
...it appears that mypy is able to use arcade's type hinting info (no more "Cannot find implementation or library stub for module named 'arcade'" error). But, it can't find the specific Sprite class. I'm guessing that is because of the
...and run mypy...
...mypy reports no issues. Unfortunately, refactoring |
The master branch has a lot of work on it already, but yeah. It isn't proving to be easy: https://github.com/pvcraven/arcade/blob/master/arcade/__init__.py |
Ah! I hadn't fetched in a couple weeks so I didn't notice this. I'll do a fetch and see how things look with the new init.py. |
My mind is mush. I forgot about https://github.com/pvcraven/arcade/issues/537. I'd consider this issue complete and #537 will make it fully functional, |
How is this working? |
Fixed in current versions. |
Bug Report
Arcade has type hints, but that type hinting information isn't exposed for other modules to use it. See the mypy docs and PEP 561 for more details.
Actual behavior:
When running mypy against a project that relies on arcade, mypy reports that "arcade" does not provide type hinting:
Expected behavior:
A project that depends on the arcade package should be able to leverage arcade's type hinting.
The fix
A PR is forthcoming...
The text was updated successfully, but these errors were encountered: