Open philsc opened 6 years ago
I was having a little bit of trouble with this as well...
I believe the following is related, but I'm not sure what the correct output from autopep8 would be
def make_dict(super_long_name_which_overflows):
return dict(super_long_name_which_overflows=
super_long_name_which_overflows)
$ autopep8 -aaaaaa -v -v -v -v --experimental make_dict.py
[file:repro.py] ---> Applying global fix for E265 ---> Applying global fix for E231 ---> Applying global fix for E721 ---> Applying global fix for W601 ---> Applying global fix for W603 ---> Applying global fix for W604 ---> Applying global fix for W690 ---> 2 issue(s) to fix {'E128': {3}, 'E251': {2}} ---> 3 issue(s) to fix {'E501': {2}, 'E251': {2}, 'E222': {2}} ---> 1 issue(s) to fix {'E501': {2}} ------------------------------------------------------------------------------- return dict(super_long_name_which_overflows=super_long_name_which_overflows) ------------------------------------------------------------------------------- return dict( super_long_name_which_overflows=super_long_name_which_overflows) ------------------------------------------------------------------------------- return dict( super_long_name_which_overflows=super_long_name_which_overflows) ------------------------------------------------------------------------------- return dict( super_long_name_which_overflows=super_long_name_which_overflows) ------------------------------------------------------------------------------- ---> Not fixing E501 on line 2 def make_dict(super_long_name_which_overflows): return dict(super_long_name_which_overflows=super_long_name_which_overflows)
I found a line of code at work that autopep8 won't format.
Here's a minimal example of this:
This is what I run:
Is autopep8 confused here because it has too many options to choose from? I would have expected it to pick the first option there. I.e. not the original line, but the one after it:
More details:
I don't have enough control over this box to install the latest version (or pip for that matter). I can give it a try later this weekend on a different machine.