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.
This causes mypy build errors to be reported when I run
stubtest --mypy-config-file=pyproject.toml numpy(in numpy/numtype), where thepyproject.tomlcontains:The build error is of the
overload-cannot-matchkind, and is caused by amemoryviewpromotion 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:
Running the command again with this
pyproject.tomlshows no build errors.