-
Notifications
You must be signed in to change notification settings - Fork 22
Description
lance-ray is missing a py.typed marker file which I introduce here, but more importantly, there seem to be a bunch of type errors in general.
This is the output of mypy:
$ mypy --strict lance_ray tests
[...]
Found 194 errors in 11 files (checked 13 source files)
Many of these are because corresponding type stubs packages such as pandas-stubs, pyarrow-stubs, and co. are not installed, similar to errors such as error: Skipping analyzing "lance": module is installed, but missing library stubs or py.typed marker because lance was missing the py.typed marker too. But there are also other issues with internal type unsoundness. I would see it personally as quite important for a library to be ideally error free under mypy --strict nowadays, both to enable safer internal refactoring, but also to provide sound interfaces for external users.
I'd propose following actions:
- introduce
mypy --strictas a CI job - install all available stubs packages such as
pandas-stubs,pyarrow-stubsas a dev dependency - start with a type error ignore list in
pyproject.tomlthat gradually would decrease in size- for
lance, it unfortunately was done the other way around, with type checking as an opt-in, which in turn means any new file will be unchecked by default
- for