hhatto / autopep8

A tool that automatically formats Python code to conform to the PEP 8 style guide.
https://pypi.org/project/autopep8/
MIT License
4.56k stars 290 forks source link

Arbitrary line shortening for E501? #651

Open amosnier opened 1 year ago

amosnier commented 1 year ago

Description

It seems that autopep8 (which is great, by the way) 1.6.0, when in vanilla-mode, shortens

        src, obj, cmd = calc_object_cmd(src=src, src_dir=src_dir, build_dir=build_dir, compiler=compiler, defines=defines, std=std, includes=includes)

to

        src, obj, cmd = calc_object_cmd(src=src, src_dir=src_dir, build_dir=build_dir,
                                        compiler=compiler, defines=defines, std=std, includes=includes)

but not any further. That's a 103-long.

I can of course configure flake8 to accept that, but the shortening seems kind of arbitrary. Why not even shorter, if my configuration says so (i.e. 79-long in vanilla-mode)? Or am I missing something?

Related to https://github.com/hhatto/autopep8/issues/598, I guess.


Environment