Skip to content

E117: False positive with tab indentation #1013

Open
@spaceone

Description

If anything precedes with two spaces, e.g. the indentation of a multiline string flake8 detects an E117 for the next correctly indented line (if indentation uses tabs):

TEST_STRING = '''
foo
  bar
'''

if __name__ == '__main__':
    print(TEST_STRING)  # indented with tab!
test_flake8_e117.py:7:1: E101 indentation contains mixed spaces and tabs
test_flake8_e117.py:7:2: E117 over-indented
$ python3.9 flake8 --version
3.9.2 (mccabe: 0.6.1, pycodestyle: 2.7.0, pyflakes: 2.3.1) CPython 3.9.1 on Linux

I can only reproduce this with flake8, not with raw pycodestyle.
Maybe related #885 #836 #705.

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