pycodestyle icon indicating copy to clipboard operation
pycodestyle copied to clipboard

E117: False positive with tab indentation

Open spaceone opened this issue 4 years ago • 1 comments

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.

spaceone avatar Sep 16 '21 21:09 spaceone