VS code pylint errors and format not working

1.5k Views Asked by At

Here is the code from test python file with errors:

asdf = "test"

print(asdf)


my_list = [1,2,3,4,5]

# expected on save
my_list = [1, 2, 3, 4, 5]

for num in my_list:
  print(num)

# Expected on save (does not format)
# print(num)

# if i manully indent to 2 spaces it gives me this error:
#   "Bad indentation. Found 2 spaces, expected 4"

Here is the errors I'm getting

enter image description here

Here is the pip freeze command screenshot:

enter image description here

Here is my VS code user setting: enter image description here

I am not sure why I am getting those error and why is it not formatting.

1

There are 1 best solutions below

0
On

These are Convention errors, not functional ones. It means that your code does not follows a certain coding convention. In Pylint it is PEP8.

Error Explanations from wiki-dot:

  1. valid-name

  2. missing-final-newline