-
Notifications
You must be signed in to change notification settings - Fork 749
Closed
Description
This happened to me when using pycodestyle 2.5.0.
Instruction to reproduce:
- Create a script test.py with the following contents:
def a(b):
return b # indented with tab
- Run
pycodestyle --show-source --show-pep8 test.py
- Output obtained:
test.py:2:1: W191 indentation contains tabs
return b
^
On new projects, spaces-only are strongly recommended over tabs.
Okay: if True:\n return
W191: if True:\n\treturn
test.py:2:2: E117 over-indented
return b
^
Use 4 spaces per indentation level.
For really old code that you don't want to mess up, you can continue
to use 8-space tabs.
Okay: a = 1
Okay: if a == 0:\n a = 1
E111: a = 1
E114: # a = 1
Okay: for item in items:\n pass
E112: for item in items:\npass
E115: for item in items:\n# Hi\n pass
Okay: a = 1\nb = 2
E113: a = 1\n b = 2
E116: a = 1\n # b = 2
Metadata
Metadata
Assignees
Labels
No labels