Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

vscode show when variable is protected or private python

"""
Hit ctrl+shift+p and type Open Settings (JSON)
After the last attribute add a comma and in a new line the following code:
"""

"python.analysis.diagnosticSeverityOverrides": {
    "reportPrivateUsage": "error"
}
  
"""
Save and close the file
Now everytime you try to use a variable that starts with
_ or __, outside their scope, vscode will warn you
"""
 
PREVIOUS NEXT
Tagged: #vscode #show #variable #protected #private #python
ADD COMMENT
Topic
Name
6+8 =