Skip to content

Conversation

@spaceone
Copy link
Contributor

Detect invalid tabs before inline comments:

printf 'foo = "bar" \t# comment\n' | pycodestyle - stdin:1:12: E261 at least two spaces before inline comment printf 'foo = "bar"\t # comment\n' | pycodestyle - stdin:1:12: E261 at least two spaces before inline comment printf 'foo = "bar"\t\t# comment\n' | pycodestyle - stdin:1:12: E261 at least two spaces before inline comment 

Fixes #582

@spaceone spaceone force-pushed the e261-fix-tab-space-mix branch 2 times, most recently from ce8a334 to bb3a941 Compare September 16, 2021 22:51
@spaceone
Copy link
Contributor Author

spaceone commented Oct 4, 2021

any reviewers?

@asottile
Copy link
Member

asottile commented Oct 4, 2021

I don't think this is correct, a space + a tab is "at least two spaces"

@spaceone spaceone force-pushed the e261-fix-tab-space-mix branch from bb3a941 to 19ed280 Compare October 7, 2021 19:55
@spaceone
Copy link
Contributor Author

spaceone commented Oct 7, 2021

Hmm, I don't think so. Why should you mix tabs and spaces?
This is especially annoying in code, which wants to migrate from tabs to spaces - some leftover tabs aren't detected.

Alternatively can I introduce a new error for this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants