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 numpy to the deps of scipy-stubs #137

Merged
merged 1 commit into from
Mar 14, 2025

Conversation

jorenham
Copy link
Contributor

@jorenham jorenham commented Mar 14, 2025

I left it out earlier because scipy already requires numpy.

But by explicitly adding numpy to deps, scipy-stubs will also be selected when --known-dependency-selector=numpy is passed, as e.g. numpy itself does.

Copy link
Owner

@hauntsaninja hauntsaninja left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

Looks like this was added in #136... When I run mypy_primer -k scipy-stubs --debug, I get mypy: can't read file 'tests/**/*.py': No such file or directory. So effectively when using mypy as the type checker, nothing is getting checked.

@hauntsaninja hauntsaninja merged commit d6ce8a2 into hauntsaninja:master Mar 14, 2025
1 check passed
@jorenham jorenham deleted the scipy-stubs-numpy-dep branch March 14, 2025 21:04
@jorenham
Copy link
Contributor Author

jorenham commented Mar 14, 2025

When I run mypy_primer -k scipy-stubs --debug, I get mypy: can't read file 'tests/**/*.py': No such file or directory. So effectively when using mypy as the type checker, nothing is getting checked.

Hm weird... It's a classic case of "but it works on my (linux) machine".

I'm guessing I should remove this line then?:
https://github.com/scipy/scipy-stubs/blob/0586ab1dd8611c62bf8df0ab6f59ee9b26b1c0d6/pyproject.toml#L113


edit: I opened scipy/scipy-stubs#486


edit edit: I merged scipy/scipy-stubs#486, could you try again to see if it works now?

@hauntsaninja
Copy link
Owner

hauntsaninja commented Mar 14, 2025

I now get mypy: error: Missing target module, package, files, or command. because of mypy_cmd we currently specify. But we can change that!

On the old scipy-stubs commit, I can repro on Linux as well. Any chance this is a basedmypy vs mypy difference?

hauntsaninja added a commit that referenced this pull request Mar 14, 2025
@hauntsaninja
Copy link
Owner

Looks to be working with your 486 PR and #139

@jorenham
Copy link
Contributor Author

Any chance this is a basedmypy vs mypy difference?

Yea, might be then.

Looks to be working with your 486 PR and #139

Pfew, ok; thanks for looking into it!

hauntsaninja added a commit that referenced this pull request Mar 14, 2025
@hauntsaninja
Copy link
Owner

Great! Thanks for the addition

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 this pull request may close these issues.

2 participants