pyright-langserver-for-pycharm
pyright-langserver-for-pycharm copied to clipboard
Resolve interpreter correctly for non-PyCharm IDEs
Presumably fixes #41. Not tested.
Qodana Community for JVM
1 new problem were found
| Inspection name | Severity | Problems |
|---|---|---|
Unused symbol |
🔶 Warning | 1 |
💡 Qodana analysis was run in the pull request mode: only the changed files were checked
View the detailed Qodana report
To be able to view the detailed Qodana report, you can either:
- Register at Qodana Cloud and configure the action
- Use GitHub Code Scanning with Qodana
- Host Qodana report at GitHub Pages
- Inspect and use
qodana.sarif.json(see the Qodana SARIF format for details)
To get *.log files or any other Qodana artifacts, run the action with upload-result option set to true,
so that the action will upload the files as the job artifacts:
- name: 'Qodana Scan'
uses: JetBrains/[email protected]
with:
upload-result: true
Contact Qodana team
Contact us at [email protected]
- Or via our issue tracker: https://jb.gg/qodana-issue
- Or share your feedback: https://jb.gg/qodana-discussions
I've tested the following IDEs on Windows (latest stable versions unless otherwise indicated):
- CLion - works
- IntelliJ Ultimate - works
- RustRover 2024.1 EAP - works
- Rider - works
The results all look like this:
>>> from collections.abc import Callable
>>>
>>> v: Callable[[int], bool] = 1
^
Pyright: Expression of type "Literal[1]" is incompatible with declared type "(int) -> bool"
Type "Literal[1]" is incompatible with type "(int) -> bool" (reportAssignmentType)
@bzoracler Thanks a lot! That saved me an unimaginably vast amount of work.
Could you show me the corresponding log entries? If that's something you don't want to show publicly, you could redact private parts and/or send me an email at <this account's name>@gmail.com.
After hours of debugging I conclude that a null interpreter is not the cause of what I saw in #41.
Painfully, that means I have two problems, one here and one has yet to be discovered.
I've sent over a log file from a CLion session - hopefully that helps.
@bzoracler Thanks, but the file doesn't contain any LSP log entries, which would look something like this:
#c.i.p.l.i.c.Lsp4jServerConnector - --> PyrightLSDescriptor@project: {"jsonrpc":"2.0", ...}
#c.i.p.l.i.c.Lsp4jServerConnector - <-- PyrightLSDescriptor@project: {"jsonrpc":"2.0", ...}
Perhaps you forgot to enable logging?
Specifically, what I want to look at the most is the didChangeConfiguration request as sent by Listener on server initialization. If the interpreter is not passed correctly, the JSON data will have no params.settings.python.pythonPath property, as shown here.
The logic was copied from PyInterpreterInspection. It sure feels good randomly stumping into something that would help solve a 2-month-old issue.
Qodana Community for JVM
It seems all right 👌
No new problems were found according to the checks applied
💡 Qodana analysis was run in the pull request mode: only the changed files were checked
View the detailed Qodana report
To be able to view the detailed Qodana report, you can either:
- Register at Qodana Cloud and configure the action
- Use GitHub Code Scanning with Qodana
- Host Qodana report at GitHub Pages
- Inspect and use
qodana.sarif.json(see the Qodana SARIF format for details)
To get *.log files or any other Qodana artifacts, run the action with upload-result option set to true,
so that the action will upload the files as the job artifacts:
- name: 'Qodana Scan'
uses: JetBrains/[email protected]
with:
upload-result: true
Contact Qodana team
Contact us at [email protected]
- Or via our issue tracker: https://jb.gg/qodana-issue
- Or share your feedback: https://jb.gg/qodana-discussions