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.57k stars 290 forks source link

code still do NOT satisfy the line limit after `autopep8` #647

Closed Steaunk closed 6 months ago

Steaunk commented 2 years ago

Python Code

def main():
    print("test")

if __name__ == "__main__":
    # python my_test_test.py -t ./this_is_a_important_test_model.model.tfrecord -m 2 -o ./logs -r 1000
    # python my_test_test.py -t ./this_is_a_important_test_model.model.tfrecord -m 1
    main()

Command Line and Configuration

[pep8]

Command Line

$ autopep8 tmp.py

Your Environment

Output

def main():
    print("test")

if __name__ == "__main__":
    # python my_test_test.py -t ./this_is_a_important_test_model.model.tfrecord -m 2 -o ./logs -r 1000
    # python my_test_test.py -t
    # ./this_is_a_important_test_model.model.tfrecord -m 1
    main()

Question

The output of this code still do NOT satisfy the line limit. How can I solve it?