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.54k stars 291 forks source link

autopep8 line length not working with async def function #727

Closed j-z10 closed 3 months ago

j-z10 commented 3 months ago

The line length of async def async_function_foo(...) exceeds 120 characters, but autopep8 does not modify its formatting. However, it works as expected with def sync_function_foo(...)


Python Code

async def async_function_foo(argument_01: int, argument_02: int, argument_03: int, argument_04: int, argument_05: int, argument_06: int) -> int:
    return argument_01 + argument_02 + argument_03 + argument_04 + argument_05 + argument_06

def sync_function_foo(argument_01: int, argument_02: int, argument_03: int, argument_04: int, argument_05: int, argument_06: int) -> int:
    return argument_01 + argument_02 + argument_03 + argument_04 + argument_05 + argument_06

Command Line

$ autopep8 -aaa --experimental --max-line-length 120

Your Environment