Closed theroggy closed 1 month ago
This is a bug in the core type checker. Could someone from the pylance team please transfer this to the pyright project? Thanks!
I did a full pass over all diagnostics emitted by the type evaluator and made sure that every one had an associated diagnostic rule. This allows the severity of all type evaluator diagnostics to be under user control. This will be addressed in the next release of pyright.
This is addressed in pyright 1.1.373.
Hmmm, I wonder if there's a regression? I'm using coc-pyright and I think I'm seeing this on 1.1.37{6,7,8}. Rolling pyright back to 1.1.375 solved the problem.
@Cnly, an intentional change was made in 1.1.376 that explains this. You probably have a config file (either a pyrightconfig.json or a pyproject.toml with a [tool.pyright] section) in your project. If so, that takes precedence over any language server settings that affect type checking behaviors. If you want to change the type checking mode, you should do so in your config file rather than in your language server settings. Or you should delete your config file and use only the language server settings to specify your type checking behaviors.
@erictraut Thank you for the rapid reply and detailed explanation! I indeed have a pyrightconfig.json
in my project. Adding "typeCheckingMode": "off"
to the file fixed the problem on 1.1.378.
Environment data
Code Snippet
Repro Steps
NDArray[BaseGeometry]
in the above snippet will be highlighted as having an error.Expected behavior
No type errors, as "type checking mode" is set to "off".
Actual behavior
This type error is shown:
Logs
No significant logging is being written...