-
-
Notifications
You must be signed in to change notification settings - Fork 133
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
CI: use matplotlib stubs #48
Conversation
The symbolic link won't work cross-platform. I like the idea of linking to the submodule, but I think the way to do it is to modify |
Mypy's mypy_path and pyright's stubPath can only point to one location, but I think with the current setup we would need two locations: 1)
The CI seems to be fine with it :) but I don't know how much friction it would cause contributors working on windows. The much simpler&better approach is to wait for microsoft/python-type-stubs#211 |
I'm not sure but i think mypy and pyright allows to overrride the config file with a cli command |
As far as I know, the current tests do not assert any matplotlib type: using the matplotlib-stubs will have no/little impact at the moment. It is probably better to wait until there is a ms-stubs-matplotlib package. About installing matplotlib as part of pandas-stubs: I'm in favor of removing the dependency on matplotlib. If a user doesn't have matplotlib installed, they probably also do not interact with any parts of pandas that return a matplotlib object. Unless there is a technical reason, I also wouldn't mind removing the dependecy on pandas. matplotlib and pandas could simply be moved to the development dependecies. |
Create an environment with |
I think we should definitely remove pandas (and matplotlib) and also disable $ grep -R "class CategoricalIndex" pandas-stubs/
<nothing> |
After fixing the missing types, we would need to disable Here is a list of the errors:
|
Some classes such as pandas-stubs/io/api.pyi: |
I discovered that we were missing these things the other day. I spent 2 hours fixing these, but ended up losing the fixes due to the issue mentioned in #36, which was very frustrating! So I have to find the time to make the same set of fixes (probably this coming weekend), then we can change the settings for |
There is a fix in #33, but I'm awaiting a test for that. |
Closing this: probably makes more sense to wait for microsoft/python-type-stubs#211 |
I hope there is a nicer solution: this makes the MS stubs a submodule and then symlinks the matplotlib folder. Pyright and mypy seem to pick up on it as "." is the stub folder.
xref #45