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

Add types ? #177

Closed
Carreau opened this issue Apr 18, 2024 · 3 comments · Fixed by #188
Closed

Add types ? #177

Carreau opened this issue Apr 18, 2024 · 3 comments · Fixed by #188

Comments

@Carreau
Copy link
Contributor

Carreau commented Apr 18, 2024

I just found an issue in numpy's usage of spins that would have been caught by types,
but as spin does not seem to have types (and the py.typed marker), mypy just stop inferring.

@stefanv
Copy link
Member

stefanv commented Apr 30, 2024

I wouldn't mind having types.

Just out of curiosity, what is the error that would have been caught?

@Carreau
Copy link
Contributor Author

Carreau commented May 2, 2024

numpy/numpy#26304, there was a migration from subprocess.run to spin.utils.run and the usage of the return value of spin.util.run was improper when the subprocess would fail.

stefanv added a commit to stefanv/spin that referenced this issue May 8, 2024
With this in place, we can progressively add more type annotations.

Closes scientific-python#177
stefanv added a commit to stefanv/spin that referenced this issue May 22, 2024
With this in place, we can progressively add more type annotations.

Closes scientific-python#177
stefanv added a commit to stefanv/spin that referenced this issue May 22, 2024
With this in place, we can progressively add more type annotations.

Closes scientific-python#177
@stefanv
Copy link
Member

stefanv commented May 22, 2024

Types scaffolding has been put in place with #188. I was going to add a py.typed file, but after some headscratching this does not seem to pertain to our situation (we don't provide any data structures that other libraries need)? But, happy to be corrected; I have a branch with it set up.

From here, we can continue typing the rest of spin.

@stefanv stefanv closed this as completed May 22, 2024
jarrodmillman pushed a commit that referenced this issue May 23, 2024
With this in place, we can progressively add more type annotations.

Closes #177
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants