-
-
Notifications
You must be signed in to change notification settings - Fork 145
Description
Describe the bug
I am using pyright through mason.nvim on Neovim. On pandas/pandas-stubs version <=2.0.3.230814 the stubs are used correctly. However, on version >=2.1.1.230928, the pandas definitions are used instead.
To Reproduce
- Provide a minimal runnable
pandas
example that is not properly checked by the stubs. - Indicate which type checker you are using (
mypy
orpyright
). - Show the error message received from that type checker while checking your example.
Please complete the following information:
- OS: Windows 11 Pro
- OS Version Version 10.0.22631 Build 22631
- python version 3.10.2
- version of type checker
- version of installed
pandas-stubs
2.1.1.230928, 2.2.3.241126
Additional context
microsoft/pyright#3540
I followed the repro steps in the above ticket to test. Version 1.4.2 which is specified there works fine. Then I incrementally upgrade pandas/pandas-stubs. Once I get to version 2.1.1.230928 (the next version available after 2.0.3.230814), stubs are no longer used and pandas definitions are used instead.
The way I am testing this is that I import DataFrame into a python script, then use LSP to goto definition. I am expecting it to go to the stub definition, which it does when it works. When it stops working (version 2.1.1.230928 and up), it goes to the pandas definition.
pyright LSP server configuration schema:
→ pyright.disableLanguageServices default: false
→ pyright.disableOrganizeImports default: false
→ pyright.disableTaggedHints default: false
→ python.analysis.autoImportCompletions default: true
→ python.analysis.autoSearchPaths default: true
→ python.analysis.diagnosticMode default: "openFilesOnly"
→ python.analysis.diagnosticSeverityOverrides
→ python.analysis.exclude default: []
→ python.analysis.extraPaths default: []
→ python.analysis.ignore default: []
→ python.analysis.include default: []
→ python.analysis.logLevel default: "Information"
→ python.analysis.stubPath default: "typings"
→ python.analysis.typeCheckingMode default: "standard"
→ python.analysis.typeshedPaths default: []
→ python.analysis.useLibraryCodeForTypes default: true
→ python.pythonPath default: "python"
→ python.venvPath default: ""