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

Comments are always formatted at 80 characters maximum #725

Open MatthieuHernandez opened 5 months ago

MatthieuHernandez commented 5 months ago

Python Code

This comment is not correctly formatted.


def _test():
    # This very long comment is a test to see if auto pep 8 ever works properly and cuts the line to the right length.
    print("test")

This comment is formatted at 80 characters, even if autopep8 is configured for a maximum length of 120.


def _test():
    # This very long comment is a test to see if auto pep 8 ever works
    # properly and cuts the line to the right length.
    print("test")

Command Line and Configuration

Command Line

python.exe -m autopep8 --max-line-length=120 -a --experimental

Your Environment