Skip to content

Commit db9e6cf

Browse files
committed
spacing
1 parent f2da364 commit db9e6cf

File tree

9 files changed

+138
-138
lines changed

9 files changed

+138
-138
lines changed

00_core.ipynb

Lines changed: 34 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"metadata": {},
77
"outputs": [],
88
"source": [
9-
"#|default_exp core"
9+
"#| default_exp core"
1010
]
1111
},
1212
{
@@ -24,7 +24,7 @@
2424
"metadata": {},
2525
"outputs": [],
2626
"source": [
27-
"#|export\n",
27+
"#| export\n",
2828
"from fastcore.all import *\n",
2929
"from ghapi.metadata import funcs\n",
3030
"\n",
@@ -45,7 +45,7 @@
4545
"metadata": {},
4646
"outputs": [],
4747
"source": [
48-
"#|hide\n",
48+
"#| hide\n",
4949
"from nbdev import *"
5050
]
5151
},
@@ -55,7 +55,7 @@
5555
"metadata": {},
5656
"outputs": [],
5757
"source": [
58-
"#|export\n",
58+
"#| export\n",
5959
"GH_HOST = os.getenv('GH_HOST', \"https://api.github.com\")\n",
6060
"_DOC_URL = 'https://docs.github.com/'"
6161
]
@@ -73,7 +73,7 @@
7373
"metadata": {},
7474
"outputs": [],
7575
"source": [
76-
"#|export\n",
76+
"#| export\n",
7777
"def _preview_hdr(preview): return {'Accept': f'application/vnd.github.{preview}-preview+json'} if preview else {}\n",
7878
"\n",
7979
"def _mk_param(nm, **kwargs): return Parameter(nm, kind=Parameter.POSITIONAL_OR_KEYWORD, **kwargs)\n",
@@ -107,7 +107,7 @@
107107
"metadata": {},
108108
"outputs": [],
109109
"source": [
110-
"#|export\n",
110+
"#| export\n",
111111
"class _GhVerb(_GhObj):\n",
112112
" __slots__ = 'path,verb,tag,name,summary,url,route_ps,params,data,preview,client,decode,__doc__'.split(',')\n",
113113
" def __init__(self, path, verb, oper, summary, url, params, data, preview, client, kwargs):\n",
@@ -149,7 +149,7 @@
149149
"metadata": {},
150150
"outputs": [],
151151
"source": [
152-
"#|export\n",
152+
"#| export\n",
153153
"class _GhVerbGroup(_GhObj):\n",
154154
" def __init__(self, name, verbs):\n",
155155
" self.name,self.verbs = name,verbs\n",
@@ -164,7 +164,7 @@
164164
"metadata": {},
165165
"outputs": [],
166166
"source": [
167-
"#|export\n",
167+
"#| export\n",
168168
"_docroot = 'https://docs.github.com/rest/reference/'"
169169
]
170170
},
@@ -174,7 +174,7 @@
174174
"metadata": {},
175175
"outputs": [],
176176
"source": [
177-
"#|export\n",
177+
"#| export\n",
178178
"def print_summary(req:Request):\n",
179179
" \"Print `Request.summary` with the token (if any) removed\"\n",
180180
" pprint(req.summary('Authorization'))"
@@ -193,7 +193,7 @@
193193
"metadata": {},
194194
"outputs": [],
195195
"source": [
196-
"#|export\n",
196+
"#| export\n",
197197
"class GhApi(_GhObj):\n",
198198
" def __init__(self, owner=None, repo=None, token=None, jwt_token=None, debug=None, limit_cb=None, gh_host=None,\n",
199199
" authenticate=True, **kwargs):\n",
@@ -251,7 +251,7 @@
251251
"metadata": {},
252252
"outputs": [],
253253
"source": [
254-
"#|hide\n",
254+
"#| hide\n",
255255
"token = os.environ['GITHUB_TOKEN']"
256256
]
257257
},
@@ -837,7 +837,7 @@
837837
"metadata": {},
838838
"outputs": [],
839839
"source": [
840-
"#|hide\n",
840+
"#| hide\n",
841841
"for hook in api.repos.list_webhooks():\n",
842842
" api.repos.delete_webhook(hook.id)"
843843
]
@@ -934,7 +934,7 @@
934934
"metadata": {},
935935
"outputs": [],
936936
"source": [
937-
"#|export\n",
937+
"#| export\n",
938938
"def date2gh(dt:datetime)->str:\n",
939939
" \"Convert `dt` (which is assumed to be in UTC time zone) to a format suitable for GitHub API operations\"\n",
940940
" return f'{dt.replace(microsecond=0).isoformat()}Z'"
@@ -975,7 +975,7 @@
975975
"metadata": {},
976976
"outputs": [],
977977
"source": [
978-
"#|export\n",
978+
"#| export\n",
979979
"def gh2date(dtstr:str)->datetime:\n",
980980
" \"Convert date string `dtstr` received from a GitHub API operation to a UTC `datetime`\"\n",
981981
" return datetime.fromisoformat(dtstr.replace('Z', ''))"
@@ -1054,7 +1054,7 @@
10541054
"metadata": {},
10551055
"outputs": [],
10561056
"source": [
1057-
"#|export\n",
1057+
"#| export\n",
10581058
"img_md_pat = re.compile(r'!\\[(?P<alt>.*?)\\]\\((?P<url>[^\\s]+)\\)')\n",
10591059
"\n",
10601060
"def _run_subp(cmd): \n",
@@ -1180,7 +1180,7 @@
11801180
"metadata": {},
11811181
"outputs": [],
11821182
"source": [
1183-
"#|export\n",
1183+
"#| export\n",
11841184
"@patch\n",
11851185
"def delete_release(self:GhApi, release):\n",
11861186
" \"Delete a release and its associated tag\"\n",
@@ -1194,7 +1194,7 @@
11941194
"metadata": {},
11951195
"outputs": [],
11961196
"source": [
1197-
"#|hide\n",
1197+
"#| hide\n",
11981198
"for rel in api.repos.list_releases(): api.delete_release(rel)"
11991199
]
12001200
},
@@ -1204,7 +1204,7 @@
12041204
"metadata": {},
12051205
"outputs": [],
12061206
"source": [
1207-
"#|export\n",
1207+
"#| export\n",
12081208
"@patch\n",
12091209
"def upload_file(self:GhApi, rel, fn):\n",
12101210
" \"Upload `fn` to endpoint for release `rel`\"\n",
@@ -1220,7 +1220,7 @@
12201220
"metadata": {},
12211221
"outputs": [],
12221222
"source": [
1223-
"#|export\n",
1223+
"#| export\n",
12241224
"@patch\n",
12251225
"def create_release(self:GhApi, tag_name, branch='master', name=None, body='',\n",
12261226
" draft=False, prerelease=False, files=None):\n",
@@ -1329,7 +1329,7 @@
13291329
"metadata": {},
13301330
"outputs": [],
13311331
"source": [
1332-
"#|export\n",
1332+
"#| export\n",
13331333
"@patch\n",
13341334
"def list_tags(self:GhApi, prefix:str=''):\n",
13351335
" \"List all tags, optionally filtered to those starting with `prefix`\"\n",
@@ -1374,7 +1374,7 @@
13741374
"metadata": {},
13751375
"outputs": [],
13761376
"source": [
1377-
"#|export\n",
1377+
"#| export\n",
13781378
"@patch\n",
13791379
"def list_branches(self:GhApi, prefix:str=''):\n",
13801380
" \"List all branches, optionally filtered to those starting with `prefix`\"\n",
@@ -1420,7 +1420,7 @@
14201420
"metadata": {},
14211421
"outputs": [],
14221422
"source": [
1423-
"#|export\n",
1423+
"#| export\n",
14241424
"# See https://stackoverflow.com/questions/9765453\n",
14251425
"EMPTY_TREE_SHA = '4b825dc642cb6eb9a060e54bf8d69288fbee4904'"
14261426
]
@@ -1446,7 +1446,7 @@
14461446
"metadata": {},
14471447
"outputs": [],
14481448
"source": [
1449-
"#|export\n",
1449+
"#| export\n",
14501450
"@patch\n",
14511451
"def create_branch_empty(self:GhApi, branch):\n",
14521452
" t = self.git.create_tree(base_tree=EMPTY_TREE_SHA, tree = [dict(\n",
@@ -1471,7 +1471,7 @@
14711471
"metadata": {},
14721472
"outputs": [],
14731473
"source": [
1474-
"#|export\n",
1474+
"#| export\n",
14751475
"@patch\n",
14761476
"def delete_tag(self:GhApi, tag:str):\n",
14771477
" \"Delete a tag\"\n",
@@ -1484,7 +1484,7 @@
14841484
"metadata": {},
14851485
"outputs": [],
14861486
"source": [
1487-
"#|export\n",
1487+
"#| export\n",
14881488
"@patch\n",
14891489
"def delete_branch(self:GhApi, branch:str):\n",
14901490
" \"Delete a branch\"\n",
@@ -1507,7 +1507,7 @@
15071507
"metadata": {},
15081508
"outputs": [],
15091509
"source": [
1510-
"#|export\n",
1510+
"#| export\n",
15111511
"@patch\n",
15121512
"def get_branch(self:GhApi, branch=None):\n",
15131513
" branch = branch or self.repos.get().default_branch\n",
@@ -1527,7 +1527,7 @@
15271527
"metadata": {},
15281528
"outputs": [],
15291529
"source": [
1530-
"#|export\n",
1530+
"#| export\n",
15311531
"@patch\n",
15321532
"def list_files(self:GhApi, branch=None):\n",
15331533
" ref = self.get_branch(branch)\n",
@@ -1577,7 +1577,7 @@
15771577
"metadata": {},
15781578
"outputs": [],
15791579
"source": [
1580-
"#|export\n",
1580+
"#| export\n",
15811581
"@patch\n",
15821582
"def get_content(self:GhApi, path):\n",
15831583
" res = self.repos.get_content(path)\n",
@@ -1600,7 +1600,7 @@
16001600
"metadata": {},
16011601
"outputs": [],
16021602
"source": [
1603-
"#|export\n",
1603+
"#| export\n",
16041604
"@patch\n",
16051605
"def create_or_update_file(self:GhApi, path, message, committer, author, content=None, sha=None, branch=''):\n",
16061606
" if not branch: branch = api.repos.get()['default_branch']\n",
@@ -1617,7 +1617,7 @@
16171617
"metadata": {},
16181618
"outputs": [],
16191619
"source": [
1620-
"#|export\n",
1620+
"#| export\n",
16211621
"@patch\n",
16221622
"def create_file(self:GhApi, path, message, committer, author, content=None, branch=None):\n",
16231623
" if not branch: branch = api.repos.get()['default_branch']\n",
@@ -1646,7 +1646,7 @@
16461646
"metadata": {},
16471647
"outputs": [],
16481648
"source": [
1649-
"#|export\n",
1649+
"#| export\n",
16501650
"@patch\n",
16511651
"def delete_file(self:GhApi, path, message, committer, author, sha=None, branch=None):\n",
16521652
" if not branch: branch = api.repos.get()['default_branch']\n",
@@ -1671,7 +1671,7 @@
16711671
"metadata": {},
16721672
"outputs": [],
16731673
"source": [
1674-
"#|export\n",
1674+
"#| export\n",
16751675
"@patch\n",
16761676
"def update_contents(self:GhApi, path, message, committer, author, content, sha=None, branch=None):\n",
16771677
" if not branch: branch = api.repos.get()['default_branch']\n",
@@ -1729,7 +1729,7 @@
17291729
"metadata": {},
17301730
"outputs": [],
17311731
"source": [
1732-
"#|export\n",
1732+
"#| export\n",
17331733
"@patch\n",
17341734
"def enable_pages(self:GhApi, branch=None, path=\"/\"):\n",
17351735
" \"Enable or update pages for a repo to point to a `branch` and `path`.\"\n",
@@ -1793,7 +1793,7 @@
17931793
"metadata": {},
17941794
"outputs": [],
17951795
"source": [
1796-
"#|hide\n",
1796+
"#| hide\n",
17971797
"import nbdev; nbdev.nbdev_export()"
17981798
]
17991799
},

0 commit comments

Comments
 (0)