Some Pyright diagnostics (diagnostic-severity: hint) not displaying #9765
Unanswered
kas2020-commits
asked this question in
Troubleshooting
Replies: 2 comments 3 replies
-
Helix Log when pyright set to "strict" mode~/.cache/helix/helix.log
|
Beta Was this translation helpful? Give feedback.
0 replies
-
Can you capture the debug logs from nvim to compare? The "standard" mode log you attached shows some |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Summary
Context about Pyright
Pyright has a configuration option called
deprecateTypingAliases
that adds a diagnostic whenever collection type hints are used through thetyping
module instead ofcollections.abc
(i.e. usingtyping.Sequence
should add a diagnostic butcollections.abc.Sequence
won't).Another thing to know is that when
typeCheckingMode="standard"
then the diagnostic has severity level of "Hint", but whentypeCheckingMode="strict"
the diagnostic is upgraded to severity level "Error"The Issue itself
Neovim seems to display the diagnostic both in standard mode and in strict mode and properly displays the diagnostic severity. Helix, however, only displays the diagnostic in strict mode when it's promoted to an "Error" severity.
References/Resources
Neovim properly displaying the diagnostic with severity "Hint" in "standard" mode
Neovim properly displaying the diagnostic with severity "Error" in "strict" mode
Helix not displaying the diagnostic with severity "Hint" in "standard" mode
Helix properly displaying the diagnostic with severity "Error" in "strict" mode
The pyright configuration used to replicate this issue (this is placed in the
pyproject.toml
project file)languages.toml
file contentsReproduction Steps
I tried this:
hx <python-file>
I expected this to happen: Report a Diagnostic with severity level 4 (Hint) of type
reportDeprecated
from pyrightInstead, this happened: Pyright reported no diagnostics to Helix client
Helix log
Log when Pyright set to "standard" mode
~/.cache/helix/helix.log
Platform
macOS
Terminal Emulator
Kitty
Installation Method
nixpkgs
Helix Version
helix 23.10 (f6021dd)
Beta Was this translation helpful? Give feedback.
All reactions