Closed cameronangliss closed 1 year ago
Thanks for opening this issue @cameronangliss !
This sounds good and would be a great improvement. Following up on our private chat, I know you would be interested in contributing to the repo on this issue.
If you think it's doable without too many changes to the setup.py file, I think opening up a PR directly would be great.
Otherwise, I would suggest a first PR to switch from setup.py to pyproject.toml, and a second focused on type hints.
In any case, we can also proceed in multiple steps on typing coverage, in case a single PR would be too big.
Let me know what you think.
Thanks for getting back to me @hsahovic! I like your idea of splitting into 2 PRs, so I made 2 branches where I'm putting that together. The second one focused on type hints is rather large (as you predicted), so we can discuss what to do about that. For now though, I believe I need privileges in order to push my branches up to origin so you can see them, and I could create two PRs out of them.
Since #399 has been merged, I would say this issue can be closed. I'm just writing a note that only src/**.py
files were given type annotations. Honestly though, that's the part of the project that's actually shipped to users, so I don't think it's necessary to go further than that, at least at the moment.
When importing
poke_env
with vscode's python type-checking mode set to'strict'
, I get the following error:Stub file not found for "poke_env"
To resolve this, I propose that we:
'strict'
mode)py.typed
file in thesrc/poke_env
directorysetup.py
thatpy.typed
must be included in the package when installed throughpip
These are the steps that I took when making my own python package for tracking state information in pokemon-showdown, and I managed to make it work. The only major difference is that I used
pyproject.toml
instead ofsetup.py
, which is the more modern equivalent ofsetup.py
, so I'm not sure if step 3 is difficult or not necessary or something like that.This is worth it because:
poke_env