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

type annotated return types in overlength lines ignored #633

Open buhtz opened 2 years ago

buhtz commented 2 years ago

This piece of code is from a real project. The last line has overlength which is correct mentioned by pycodestyle but ignored and not corrected by autopep8.

Python Code


def cut_by_row_keep_group(data: pandas.DataFrame,
                          group_column,
                          n_pieces: int,
                          sort_kind: str = 'quicksort') -> list[pandas.DataFrame]:
                                                                               ^^^

Using Python 3.9.2 from Debian 11 repository. Using autopep8 1.5.5 (pycodestyle: 2.6.0).