Skip to content

Conversation

hauntsaninja
Copy link
Collaborator

@hauntsaninja hauntsaninja commented Mar 5, 2025

Fixes #15302, fixes #14560. Linking #18343

@jorenham
Copy link
Contributor

jorenham commented Mar 5, 2025

I just ran it on the numpy stubs in numpy/numtype, and when I remove the allowlist entry that I mentioned in #15302 (comment), it passes 🎉.

I'm not sure if it's relevant here, but if I don't remove that allowlist entry, stubtest doesn't report it as unused.


edit:

I published the code to https://github.com/numpy/numtype/tree/mypy-18756. To repro, run uv run tool/stubtest.py, and uncomment line 37 in the .mypyignore allowlist (https://github.com/numpy/numtype/blob/0c64f1e0cc3d17312a60a1c3f883367f9f9d39cb/.mypyignore#L37)

jorenham added a commit to numpy/numtype that referenced this pull request Mar 5, 2025
@hauntsaninja hauntsaninja merged commit a067d84 into python:master Mar 7, 2025
12 checks passed
@hauntsaninja hauntsaninja deleted the stubrelax branch March 7, 2025 00:16
@hauntsaninja
Copy link
Collaborator Author

Thanks for checking, will look into the unused allowlist thing too...

hauntsaninja added a commit to hauntsaninja/numtype that referenced this pull request Mar 7, 2025
cc @jorenham 

I was looking into python/mypy#18756 (comment)

It looks like the pre-release version of mypy crashes (for some reason related to property changes, will investigate). Crash logs are emitted to stderr and process exits with exit code 2.

This code does correctly chain the exit code, but swallows stderr.
jorenham pushed a commit to numpy/numtype that referenced this pull request Mar 7, 2025
cc @jorenham 

I was looking into python/mypy#18756 (comment)

It looks like the pre-release version of mypy crashes (for some reason related to property changes, will investigate). Crash logs are emitted to stderr and process exits with exit code 2.

This code does correctly chain the exit code, but swallows stderr.
@jorenham jorenham mentioned this pull request May 11, 2025
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.

stubtest: Recognize __ as indicating positional-only arg at runtime stubtest: False-positives with parameter name mangling outside of classes
2 participants