-2

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.

soul
  • 29
  • 9
  • try to follow the [pep8 style guideline](https://www.python.org/dev/peps/pep-0008/) for your code – Tibebes. M Sep 25 '20 at 11:53
  • also please avoid sharing codes as screenshots as it won't help others reproduce what your're facing and help easily (copy&paste codes in your question with proper formatting instead). [How do I ask a good question?](https://stackoverflow.com/help/how-to-ask) and [How to create a Minimal, Reproducible Example.](https://stackoverflow.com/help/minimal-reproducible-example) – Tibebes. M Sep 25 '20 at 11:54

1 Answers1

0

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

Or b
  • 666
  • 1
  • 5
  • 22