Open Krakonos opened 3 months ago
Littlefs seems to be a C library, could you link to what stubs you are using, I don't see any in the project github.
I haven't yet tried to repro, but stub should be: https://github.com/jrast/littlefs-python/blob/fa538bded158f26530ee559d56b78a1273c8766f/src/littlefs/lfs.pyi#L9
Correct, this is the stub. Note that the version 0.10.1 fixes this stub, so use 0.10.0 for reproduction.
Crash Report
I have a library, littlefs-python. Using it crashes mypy. A simple example with
mypy-1.9.0
andlittlefs-python-0.10.0
:This seems to the offending definition:
And changing LFS_TYPE_REG & LFS_TYPE_DIR to an integer constant fixes the issue. It likely is a problem of the stub and I will report a separate bug to littlefs-python upstream, however, IMHO mypy should report this as a problem, not crash.
Traceback
To Reproduce
See snippet above.
Your Environment
mypy foo.py
)mypy.ini
(and other config files): no config present