Skip to content

Indentation containing tabs raise E117 error (again) #885

@jcarlosroldan

Description

@jcarlosroldan

This happened to me when using pycodestyle 2.5.0.

Instruction to reproduce:

  1. Create a script test.py with the following contents:
def a(b):
	return b  # indented with tab
  1. Run pycodestyle --show-source --show-pep8 test.py
  2. 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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions