myint / pyformat

Formats Python code to follow a consistent style
https://pypi.python.org/pypi/pyformat
94 stars 10 forks source link

pep8 config is ignored #5

Open dalberto opened 7 years ago

dalberto commented 7 years ago

When pyformat is used, an existing pep8 configuration is not applied.

Example:

# test.py
l = ['a', 'really', 'really', 'really', 'long', 'line', 'that', 'violates', 'max-line', 'limit']
# .pep8
[pep8]
max-line-length=120

Running autopep8 -i test.py results in:

# test.py after running autopep8
l = ['a', 'really', 'really', 'really', 'long', 'line', 'that', 'violates', 'max-line', 'limit']

As expected the file was not changed because it is under the 120 max-line-length in the autopep8 config.

Running pyformat -i test.py results in:

# test.py after running pyformat
l = ['a', 'really', 'really', 'really', 'long',
     'line', 'that', 'violates', 'max-line', 'limit']