on-internet
← Community

"at" sign (@) in Pylance/Pyright type hints

Stack Overflow ·

The July 2022 release of the Python extension for Visual Studio Code introduced "Inlay Type Hints", which automatically suggests return types of functions that don't have an explicit annotation. To enable it, you can set "python.analysis.inlayHints.functionReturnTypes": true to your IDE user settings (Preferences: Open Settings (JSON) command). While testing this feature, I noticed the following kind of suggestion, inside a class: ... where the highlighted text in yellow is the return type suggested by the Python extension, which is based on Pylance, which itself relies on Pyright. My question

Comments

Sign in or sign up to comment and upvote.

No comments yet.