-
-
Notifications
You must be signed in to change notification settings - Fork 268
Switch to W504 from W503 (line break before a logical operator) #545
Comments
I personaly against such rule changes.
To be clear, I'm not more in favor of W504 than W503 or whatever, I just think that changing that rule will provides problems, without any improvment. Regards. |
There is always a way to apply changes softly (deactivate W503 and make W504 beta).
It's actually allows read code easily. See [1] https://mail.python.org/pipermail/python-ideas/2016-April/039774.html http://rhodesmill.org/brandon/slides/2012-11-pyconca/#laying-down-the-law
The contributors too. Why OCA force them to update they code to W503? |
Agree with @legalsylvain to allow both styles. |
Allowing both is also a solution |
Changing this style rule we will have too many travis red results. If the current style was changed and the new one will make us headaches... then what about remove this rule? Adding it to ignore section of the flake8 configuration file: W503 |
Also, we can disable W503 and apply W504 since odoo 12 |
The technical solution is ignoring both from the configuration file of flake8. FYI we have advanced script for pylint (to choose a special configuration file for each odoo version or PR or betas...) but for flake8 (this check is a flake8 one) we don't have this options... and IMHO allowing both is the same that to disable both. |
More info about OCA#545
FYI I have taken the liberty to have created the following PR: |
Closed by allowing both in #546 |
This change allows both formatting styles when a line break is around a binary operator, to be before or after the operator. This is due to a change in PEP-8 recomendations. For more info, see the following MQT issue: OCA/maintainer-quality-tools#545
This change allows both formatting styles when a line break is around a binary operator, to be before or after the operator. This is due to a change in PEP-8 recomendations. For more info, see the following MQT issue: OCA/maintainer-quality-tools#545
Allows both formatting styles when a line break is around a binary operator, to be before or after the operator. This is due to a change in PEP-8 recommendations. For more info, see the following MQT issue: OCA/maintainer-quality-tools#545
Allows both formatting styles when a line break is around a binary operator, to be before or after the operator. This is due to a change in PEP-8 recommendations. For more info, see the following MQT issue: OCA/maintainer-quality-tools#545
Could OCA use W504, i.e.
instead of W503, i.e.
See
PyCQA/pycodestyle#498
https://github.com/PyCQA/pycodestyle/pull/502/files
Feel free to add 👍 or 👎 to this post
The text was updated successfully, but these errors were encountered: