autopep8
autopep8 copied to clipboard
JSON long strings aren't formatted
Python Code
import json
whatever_json = {
"name": "JSON Error",
"long string": "This sentence is so long that it breaks the autopep autoformatter, or am I doing something wrong? It would be great to know. Thanks.",
"Awesome": "Tool btw"
}
def doing_json_things():
"""Doing JSON things.
"""
print(whatever_json)
Command Line and Configuration
Command Line
$ autopep8 --in-place --aggressive --aggressive test.py
Your Environment
- Python version: 2.7.15
- autopep8 version: 1.4.4
- Platform: macOSX
This case does nothing with pycodestyle
and autopep8
.
Strings with a long token itself are difficult to split or break. If you have any good ideas or patches, welcome :)