Skip to content

python linting and members #2206

Answered by erictraut
crankywilson asked this question in Q&A
Discussion options

You must be logged in to vote

The term "linting" typically refers to tools that check for code style conformance (indentation, naming, etc.). By that definition, Pylance doesn't do any linting. For that, you can enable pylint or other tools specifically focused on code style.

What you're looking for is static type checking, and Pylance does provide that. However, type checking errors are disabled by default in Pylance because many users don't want to be bothered by such errors. To enable this, set the "python.analysis.typeCheckingMode" setting to "basic". Once this mode is enabled, Pylance will emit errors or warnings for things like accesses to attributes that are not declared within a class.

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Answer selected by crankywilson
Comment options

You must be logged in to vote
1 reply
@erictraut
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants