We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 99d9c0e commit 8a5d87cCopy full SHA for 8a5d87c
1 file changed
format_json.py
@@ -9,9 +9,9 @@
9
path = Path().resolve()
10
11
for file in path.rglob("*.json"):
12
- with codecs.open(str(file), encoding='utf8') as f:
+ with file.open(encoding='utf8') as f:
13
data = json.load(f)
14
15
- with codecs.open(str(file), 'w', encoding='utf8') as f:
16
- print(json.dumps(data, indent=2), file=f)
+ with file.open('w', encoding='utf8') as f:
+ print(json.dumps(data, indent=4), file=f)
17
0 commit comments