Open hayata-yamamoto opened 4 years ago
Seeing the same.
@hayata-yamamoto @m3nu
Thanks for using autopep8 👍
You need to add the -a
option (-aa
, -aaa
too) to fix the indication about max-line-length.
$ cat target.py
import random
def func():
return min(max(random.random(), random.randint(1, 100)), max(random.randint(0, 100), random.randint(0, 100)))
$ autopep8 -d target.py
$ autopep8 -a -d target.py
--- original/target.py
+++ fixed/target.py
@@ -2,4 +2,5 @@
def func():
- return min(max(random.random(), random.randint(1, 100)), max(random.randint(0, 100), random.randint(0, 100)))
+ return min(max(random.random(), random.randint(1, 100)),
+ max(random.randint(0, 100), random.randint(0, 100)))
I'm glad to use this library. I appreciate your updates.
Anyway, I wonder why E501 error cannot be detected by autopep8, although flake8 which uses the same pycodestyle can do that. From my perspective, this problem could be big because format checking is incorporated into OSS services' CI settings.
Unfortunately, I'm not sure the reason for this problem, but I'm quite in trouble. For example, autopep8 passed my codes, but flake8 doesn't allow my code. Since flake8 does not provide formatting methods, I'm fixing by myself even if I use autopep8... :(
Would it be possible to investigate and modify if this error would happen by some bugs?
Python Code
For example, the following is over 99 words, but autopep8 says nothing.
Command Line and Configuration
Command Line
FYI: flake8 can detect this error.
Your Environment