Skip to content

Commit 78ea1e8

Browse files
committed
yapf update to tutorials file
1 parent c292f2b commit 78ea1e8

File tree

1 file changed

+17
-16
lines changed

1 file changed

+17
-16
lines changed

examples/scripts/tutorials.py

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@
1515

1616

1717
def upload_doc(path, section):
18-
title = path.split('/')[-1].replace(".ipynb", '').capitalize().replace('_', ' ')
18+
title = path.split('/')[-1].replace(".ipynb",
19+
'').capitalize().replace('_', ' ')
1920

2021
with open(path) as fb:
2122
nb = nbformat.reads(json.dumps(json.load(fb)), as_version=4)
@@ -73,29 +74,29 @@ def make_sections(sections):
7374

7475

7576
def change_name(slug, title, headers):
76-
resp = requests.put(
77-
f'{README_DOC_ENDPOINT}/{slug}',
78-
json={
79-
"title": title,
80-
"category": CATEGORY_ID
81-
},
82-
headers=headers
83-
)
77+
resp = requests.put(f'{README_DOC_ENDPOINT}/{slug}',
78+
json={
79+
"title": title,
80+
"category": CATEGORY_ID
81+
},
82+
headers=headers)
8483
resp.raise_for_status()
8584

8685

8786
def erase_category_docs(cat_slug):
88-
headers = {
89-
"Accept": "application/json",
90-
"Authorization": README_AUTH
91-
}
87+
headers = {"Accept": "application/json", "Authorization": README_AUTH}
9288

93-
response = requests.request("GET", f'https://dash.readme.com/api/v1/categories/{cat_slug}/docs', headers=headers)
89+
response = requests.request(
90+
"GET",
91+
f'https://dash.readme.com/api/v1/categories/{cat_slug}/docs',
92+
headers=headers)
9493
docs = response.json()
9594
for doc in docs:
9695
for child in doc["children"]:
97-
resp = requests.delete(f'{README_DOC_ENDPOINT}/{child["slug"]}', headers=headers)
98-
resp = requests.delete(f'{README_DOC_ENDPOINT}/{doc["slug"]}', headers=headers)
96+
resp = requests.delete(f'{README_DOC_ENDPOINT}/{child["slug"]}',
97+
headers=headers)
98+
resp = requests.delete(f'{README_DOC_ENDPOINT}/{doc["slug"]}',
99+
headers=headers)
99100

100101

101102
@click.command()

0 commit comments

Comments
 (0)