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
creates syntax error with -aa --select=E,W #518
Comments
Possibly related, but separate bug: #463 If I remove the comment on end of line (and change 2.19000000 to 2.190000000000000000000000000 so the line is too long) then it introduces no error, but it does create bad indentation: --- original/foo.py
+++ fixed/foo.py
@@ -1,4 +1,7 @@
if True:
if True:
- assert_equal(self.nodes[0].getbalance(
- ), bal + Decimal('50.00000000') + Decimal('2.190000000000000000000000000'))
+ assert_equal(
+ self.nodes[0].getbalance(),
+ bal +
+ Decimal('50.00000000') +
+ Decimal('2.190000000000000000000000000')) |
Another more specific version (starting from a good result from applying just E rules): if True:
if True:
assert_equal(
self.nodes[0].getbalance(),
bal +
Decimal('50.00000000') +
Decimal('2.19000000')) # block reward + tx Output from +++ fixed/foo2.py
@@ -3,5 +3,5 @@
assert_equal(
self.nodes[0].getbalance(),
bal +
- Decimal('50.00000000') +
- Decimal('2.19000000')) # block reward + tx
+ Decimal('50.00 + 00000')
+ Decimal('2.19000000')) # block reward + tx Seems it doesn't like the mutually contradictory behaviour of W503, W504 ... |
Summary: There's no need to specify --select when we're picking all the options. It turns out that autopep8 with W50x options is a bit buggy, so disable that for now. hhatto/autopep8#518 Test Plan: arc lint --everything (tried on flake8 3.5.0, 3.6.0, and 3.7.9 latest) Reviewers: #bitcoin_abc, deadalnix Reviewed By: #bitcoin_abc, deadalnix Differential Revision: https://reviews.bitcoinabc.org/D5219
When We will release version 1.5.1 with this change within two days. Thanks |
Python Code
I put if True: just for indentation purposes. This is excerpt from here:
Command Line
Output converts
Decimal('50.00000000') + Decim...
toDecimal('50.00 + 00000') Decim...
(note that besides the movement of the+
, one0
is missing):Your Environment
Also appears in autopep8 1.4.3 (pycodestyle: 2.4.0), on Python 3.7.3 -- Ubuntu 19.04 stock.
But does not appear in autopep8 1.3.4 (pycodestyle: 2.3.1) on Python 3.6.9 (pyenv).
The text was updated successfully, but these errors were encountered: