-
Notifications
You must be signed in to change notification settings - Fork 752
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
indent-size
not considered when computing length of tab-indented lines.
#1189
Comments
Looks like line length computation is still an unknown secret algorithm in 2024 because another tool doesn't get it right - especially it it claims be be a style checker ... Any plans to get this issue triaged and worked on? |
feel free to send a patch instead of snark |
I believe I can provide a patch after I reading https://pycodestyle.pycqa.org/en/latest/developer.html#contribute Let me do some tests on how to solve it efficiently, as it touches every byte. |
@asottile I checked on available options to pycodestyle. It misses a Are you going to provide such a parameter, or is it up to me to add this with my PR?
Source: https://pycodestyle.pycqa.org/en/latest/intro.html#configuration |
@Paebbels honestly you're attitude or the attitude you convey with your choice of language has biased me against any improvement here since 99% of people writing Python use spaces. If you want traction in this assume you're doing all the work and we'll do our best to review it, assuming you also improve your behavior. If you seem to think another option is necessary at it with a very detailed justification because I don't expect this should require what you are proposing (and thus neither Anthony nor I will be providing that for you) |
Hi.
It seems like the
indent-size
option is not considered for the computation of line-length (looking at the code appears to confirm my suspicion).This means that there can be a significant number of false negatives for tab-indented lines.
This was tested for
pycodestyle 2.10.0
andpycodestyle 2.11.0
.MWE:
All non-ignored test file's lines are longer than the maximum line length, when taking into account the
indent-size
.However, only 2 of them are flagged as such.
Each tab counts only 1 space, instead of
indent-size
spaces.tox.ini
Test file
Pycodestyle's output
The text was updated successfully, but these errors were encountered: