Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

E117: False positive with tab indentation #1013

Open
spaceone opened this issue Sep 16, 2021 · 1 comment
Open

E117: False positive with tab indentation #1013

spaceone opened this issue Sep 16, 2021 · 1 comment

Comments

@spaceone
Copy link
Contributor

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.

@asottile asottile changed the title False positive E117 with tab indentation E117: False positive with tab indentation Sep 16, 2021
@rysson
Copy link

rysson commented Aug 14, 2022

Still occurs in 4.0.1 (mccabe: 0.6.1, pycodestyle: 2.8.0, pyflakes: 2.4.0) CPython 3.10.5 on Linux

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants