3

VS Code (and in particular the MS Python Language Server) shows lot's of unnecessary errors. These appear as it lints while I type, but then they persist afterwards.

For example, after typing self.var = var

[Python] 's' used before definition [use-before-def]
[Python] 'se' used before definition [use-before-def]
[Python] 'sel' used before definition [use-before-def]

These linter errors are left on the word self.

I've tried disabling autosave but it didn't help

I don't want to have to disable the server since I like IntelliCode, which requires it

Is there any way to either fix the issue or just mute these errors?

Jean-Francois T.
  • 11,549
  • 7
  • 68
  • 107
Andy
  • 263
  • 1
  • 11
  • Is it inside a `dataclass`? – Jean-Francois T. Mar 26 '19 at 02:20
  • It sounds like you might be seeing an issue with the MS Python Language Server - it'd be great if you can raise it on their GitHub Issues at https://github.com/Microsoft/vscode-python/issues/ - so the team can take a look? I'm glad to hear you like IntelliCode for Python! Thanks Mark Wilson-Thomas Visual Studio IntelliCode Team – Mark Wilson-Thomas MSFT Dec 13 '18 at 18:55
  • Nah sorry man, ended up using something else and forgot about this – Andy Mar 28 '19 at 00:26

0 Answers0