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

[REF] travis_run_flake8.cfg: Use B950 instead of E510 #596

Closed
wants to merge 1 commit into from

Conversation

gustavovalverde
Copy link
Member

As explained in: https://github.com/PyCQA/flake8-bugbear#how-to-enable-opinionated-warnings

B950: Line too long. This is a pragmatic equivalent of pycodestyle's E501: it considers "max-line-length" but only triggers when the value has been exceeded by more than 10%. You will no longer be forced to reformat code due to the closing parenthesis being one character too far to satisfy the linter. At the same time, if you do significantly violate the line length, you will receive a message that states what the actual limit is. This is inspired by Raymond Hettinger's "Beyond PEP 8" talk and highway patrol not stopping you if you drive < 5mph too fast. Disable E501 to avoid duplicate warnings.

As explained in: https://github.com/PyCQA/flake8-bugbear#how-to-enable-opinionated-warnings

B950: Line too long. This is a pragmatic equivalent of pycodestyle's E501: it considers "max-line-length" but only triggers when the value has been exceeded by more than 10%. You will no longer be forced to reformat code due to the closing parenthesis being one character too far to satisfy the linter. At the same time, if you do significantly violate the line length, you will receive a message that states what the actual limit is. This is inspired by Raymond Hettinger's "Beyond PEP 8" talk and highway patrol not stopping you if you drive < 5mph too fast. Disable E501 to avoid duplicate warnings.
@pedrobaeza
Copy link
Member

The same problem is going to happen when you are nearly the border of that tolerance, so I prefer the stricter one.

👎 to this.

@tbaden
Copy link
Member

tbaden commented May 13, 2019

the problem with tolerance values is, that people tend to abuse these. nobody drives 80mph, they drive 84mph because they know about the tolerance. so as @pedrobaeza said, the problem will only shift to the tolerance.

@pedrobaeza
Copy link
Member

Closing as there's a second opinion against this.

@pedrobaeza pedrobaeza closed this May 13, 2019
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

Successfully merging this pull request may close these issues.

None yet

3 participants