4

After an incident I have reinstalled the default Python extension in VS code (for Windows 10) and pylint started to perform in a very strange way for any python file in my project (see an example below):

List of errors

Pylint obviously works here as lines 4, 5 and 7 are shown as correct ones, while lines 1, 9, 10 and 11 are marked as containing errors.

But the list of these errors looks quite mysterious for me: I can not understand how any pylint option may be unrecognized or bad in a fresh unchanged installation?

Any suggestion how to fix the problem?

2 Answers2

6

Add --disable=E0015 argument to the Python "Pylint Args" configuration.

enter image description here

kenju
  • 5,866
  • 1
  • 41
  • 41
1

The issue is in your configuration file or the option used to launch pylint, old-octal-literal does not exists anymore and pylint 2.14.0 started to warn about this kind of thing. See https://github.com/PyCQA/pylint/issues/6794.

Pierre.Sassoulas
  • 3,733
  • 3
  • 33
  • 48
  • Thank you very much for the hint, I have degraded pylint to 2.13.9 and the number of listed errors decreased significantly. Could you suggest also the way how to fix "unable to import" errors (line 9-11)? Because I did not find the solution that works for me, for example here: https://stackoverflow.com/questions/53939751/pylint-unresolved-import-error-in-visual-studio-code – Kostiantyn Ivashchenko Jun 02 '22 at 23:15
  • 1
    pylint needs to be installed in an environment where its dependencies are also installed. (In fact it warn you that they are not). Re downgrading to 2.13.9, the best fix would be to fix the configuration file, a faster fix would be to disable ``bad-option-value`` (but pylint won't tell you if you have a typo in a disable/enable). – Pierre.Sassoulas Jun 03 '22 at 06:34