-1

When i write python code on my visual studio code editor i can't find any warnings or errors. I installed python extension, I also change the version of that extension.. I also read many documentations of python extension and visual studio but can't find any solution Here is the image...

Mahi
  • 13
  • 4

1 Answers1

0

You could use Python code analysis tool "Pylint" or use "Microsoft" or "Pylance" language service in VS Code.

  1. Python code analysis tool "Pylint".

    Please install the module "pylint" in the Python environment currently used in VS Code and enable its use settings.

    Linting Python in Visual Studio Code.

  2. Use "Microsoft" or "Pylance" language services.

Please use it in "settings.json":

  "python.languageServer": "Microsoft",`

or

 "python.languageServer": "Pylance",

before:

enter image description here

after:

enter image description here

enter image description here

Jill Cheng
  • 9,179
  • 1
  • 20
  • 25