Python Visual Studio code import Syntax problems // color

Question:

For some reasons my Visual Studio code doesn´t show the color for the imported library.

In the attached file you see what I mean.

I tried already:

  • Deinstalled vsc and reinstalled it again
  • deleted the settings.json in (%APPDATA%CodeUser)
  • deinstalled all extensions and reinstalled it again

If you know how I can fix it, let me know it.:)

This picture shows my current vsc without any colors anymore

This picture shows my current vsc without any colors anymore

This picture shows vsc how it should be colored

This picture shows vsc how it should be colored

Asked By: crytowave

||

Answers:

This is an issue with the newest update of VSCode. Here is a bug report showing the same problems. Changing linters seems not to fix the issue at the moment. Here are the patch notes as well, even though they aren’t helpful here. I suggest downgrading VSCode if you want to fix this issue, which may require you to first uninstall it and then reinstall from here. Hopefully they will post a statement on this issue soon for a more permanent fix.

This issue has been fixed in the newest update of the Python extension. Link. Restart VSCode, navigate to the extensions page, and click reload on the Python extension.

Answered By: Regnegade

This problem is still there.
I disabled C/C++ themes.

After that I am able to see Python imports in color

enter image description here

Answered By: Midhilesh Momidi