Content-Length: 236184 | pFad | http://github.com/python/mypy/issues/18744

8A stubtest ignores `strict_bytes = true` in `pyproject.toml` 1.15.0 · Issue #18744 · python/mypy · GitHub
Skip to content

stubtest ignores strict_bytes = true in pyproject.toml 1.15.0 #18744

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

Closed
jorenham opened this issue Feb 27, 2025 · 0 comments · Fixed by #19002
Closed

stubtest ignores strict_bytes = true in pyproject.toml 1.15.0 #18744

jorenham opened this issue Feb 27, 2025 · 0 comments · Fixed by #19002
Labels
bug mypy got something wrong topic-stubtest

Comments

@jorenham
Copy link
Contributor

This causes mypy build errors to be reported when I run stubtest --mypy-config-file=pyproject.toml numpy (in numpy/numtype), where the pyproject.toml contains:

[tool.mypy]
# [...]
strict_bytes = true

The build error is of the overload-cannot-match kind, and is caused by a memoryview promotion in https://github.com/numpy/numtype/blob/2a9953a1be3c14660f29aabbaffc3e7fb6c2135a/src/numpy-stubs/__init__.pyi#L1143.


The workaround is to use the superseded (and undocumented) flags instead:

[tool.mypy]
# [...]
disable_bytearray_promotion = true
disable_memoryview_promotion = true

Running the command again with this pyproject.toml shows no build errors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug mypy got something wrong topic-stubtest
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/python/mypy/issues/18744

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy