1
0
mirror of https://github.com/stedolan/jq.git synced 2024-05-11 05:55:39 +00:00

docs: Fix coding style of Python scripts using YAPF (#2606)

This commit is contained in:
itchyny
2023-06-08 19:04:19 +09:00
committed by GitHub
parent fd9da6647c
commit e5414e6828
3 changed files with 247 additions and 227 deletions

View File

@@ -2,12 +2,12 @@
import yaml
with open("content/manual/manual.yml") as f:
manual = yaml.safe_load(f)
for section in manual.get('sections', []):
for entry in section.get('entries', []):
for example in entry.get('examples', []):
print(example.get('program', '').replace('\n', ' '))
print(example.get('input', ''))
for s in example.get('output', []):
print(s)
print('')
manual = yaml.safe_load(f)
for section in manual.get('sections', []):
for entry in section.get('entries', []):
for example in entry.get('examples', []):
print(example.get('program', '').replace('\n', ' '))
print(example.get('input', ''))
for s in example.get('output', []):
print(s)
print('')