Skip to content
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

Run mypy on Tools/wasm #109125

Closed
sobolevn opened this issue Sep 8, 2023 · 5 comments
Closed

Run mypy on Tools/wasm #109125

sobolevn opened this issue Sep 8, 2023 · 5 comments
Assignees
Labels
OS-wasi topic-typing type-feature A feature request or enhancement

Comments

@sobolevn
Copy link
Member

sobolevn commented Sep 8, 2023

Feature or enhancement

Right now we already have 3 fully typed and checked tools:

I think we can also add Tools/wasm quite easily to this list.
Tools/wasm already has most of the type annotations, but there are some mypy errors to fix.

Linked PRs

@sobolevn sobolevn added type-feature A feature request or enhancement topic-typing OS-wasi labels Sep 8, 2023
@sobolevn sobolevn self-assigned this Sep 8, 2023
sobolevn added a commit to sobolevn/cpython that referenced this issue Sep 8, 2023
@brettcannon
Copy link
Member

I'm not sure if it's worth keeping a couple of scripts typed, especially based on the restrictions of typing in the repo (e.g., older versions of Python w/o typing_extensions access, etc.). I honestly would be fine stripping out the types in the scripts in that directory rather than try to keep the types working.

@corona10
Copy link
Member

We may need to define the scope of what scripts would be worth adding typing, and applying mypy pipeline.

cc @AlexWaygood @erlend-aasland @vstinner

@AlexWaygood
Copy link
Member

We may need to define the scope of what scripts would be worth adding typing, and applying mypy pipeline.

I'm not sure this needs to be formalised much. I think we should add mypy to CI for self-contained CPython projects where the maintainers of those projects say they'd find it useful. We should avoid doing so for projects where the maintainers of those projects say it wouldn't be useful.

@vstinner
Copy link
Member

Once I will be done with refactoring libregrtest #109162 I will need help to add type hints there ;-) IMO it would be a more interesting target than Tools/wasm/ scripts.

hugovk pushed a commit that referenced this issue Sep 19, 2023
hugovk pushed a commit to hugovk/cpython that referenced this issue Sep 19, 2023
(cherry picked from commit f65497f)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
@hugovk
Copy link
Member

hugovk commented Sep 19, 2023

Done via #109126, thanks!

@hugovk hugovk closed this as completed Sep 19, 2023
csm10495 pushed a commit to csm10495/cpython that referenced this issue Sep 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OS-wasi topic-typing type-feature A feature request or enhancement
Projects
None yet
Development

No branches or pull requests

6 participants