Skip to content

Commit 439c828

Browse files
committed
clean
1 parent dc42260 commit 439c828

2 files changed

Lines changed: 214 additions & 30 deletions

File tree

nbs/02_foundation.ipynb

Lines changed: 32 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4266,10 +4266,24 @@
42664266
"\n",
42674267
"### Config.get\n",
42684268
"\n",
4269-
"> Config.get (k, default=None)"
4269+
"```python\n",
4270+
"\n",
4271+
"def get(\n",
4272+
" k, default:NoneType=None\n",
4273+
"):\n",
4274+
"\n",
4275+
"\n",
4276+
"```"
42704277
],
42714278
"text/plain": [
4272-
"> Config.get (k, default=None)"
4279+
"```python\n",
4280+
"\n",
4281+
"def get(\n",
4282+
" k, default:NoneType=None\n",
4283+
"):\n",
4284+
"\n",
4285+
"\n",
4286+
"```"
42734287
]
42744288
},
42754289
"execution_count": null,
@@ -4361,12 +4375,26 @@
43614375
"\n",
43624376
"### Config.find\n",
43634377
"\n",
4364-
"> Config.find (cfg_name, cfg_path=None, **kwargs)\n",
4378+
"```python\n",
4379+
"\n",
4380+
"def find(\n",
4381+
" cfg_name, cfg_path:NoneType=None, kwargs:VAR_KEYWORD\n",
4382+
"):\n",
4383+
"\n",
4384+
"\n",
4385+
"```\n",
43654386
"\n",
43664387
"*Search `cfg_path` and its parents to find `cfg_name`*"
43674388
],
43684389
"text/plain": [
4369-
"> Config.find (cfg_name, cfg_path=None, **kwargs)\n",
4390+
"```python\n",
4391+
"\n",
4392+
"def find(\n",
4393+
" cfg_name, cfg_path:NoneType=None, kwargs:VAR_KEYWORD\n",
4394+
"):\n",
4395+
"\n",
4396+
"\n",
4397+
"```\n",
43704398
"\n",
43714399
"*Search `cfg_path` and its parents to find `cfg_name`*"
43724400
]

nbs/04_docments.ipynb

Lines changed: 182 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1170,20 +1170,104 @@
11701170
"name": "stdout",
11711171
"output_type": "stream",
11721172
"text": [
1173-
"The sum of two numbers.\n",
1174-
"\n",
1175-
" Used to demonstrate numpy-style docstrings.\n",
1176-
"\n",
1177-
"Parameters\n",
1178-
"----------\n",
1179-
"a : int\n",
1180-
" the 1st number to add\n",
1181-
"b : int\n",
1182-
" the 2nd number to add (default: 0)\n",
1183-
"\n",
1184-
"Returns\n",
1185-
"-------\n",
1186-
"int\n",
1173+
"The sum of two numbers.\n"
1174+
]
1175+
},
1176+
{
1177+
"name": "stdout",
1178+
"output_type": "stream",
1179+
"text": [
1180+
"\n"
1181+
]
1182+
},
1183+
{
1184+
"name": "stdout",
1185+
"output_type": "stream",
1186+
"text": [
1187+
" Used to demonstrate numpy-style docstrings.\n"
1188+
]
1189+
},
1190+
{
1191+
"name": "stdout",
1192+
"output_type": "stream",
1193+
"text": [
1194+
"\n"
1195+
]
1196+
},
1197+
{
1198+
"name": "stdout",
1199+
"output_type": "stream",
1200+
"text": [
1201+
"Parameters\n"
1202+
]
1203+
},
1204+
{
1205+
"name": "stdout",
1206+
"output_type": "stream",
1207+
"text": [
1208+
"----------\n"
1209+
]
1210+
},
1211+
{
1212+
"name": "stdout",
1213+
"output_type": "stream",
1214+
"text": [
1215+
"a : int\n"
1216+
]
1217+
},
1218+
{
1219+
"name": "stdout",
1220+
"output_type": "stream",
1221+
"text": [
1222+
" the 1st number to add\n"
1223+
]
1224+
},
1225+
{
1226+
"name": "stdout",
1227+
"output_type": "stream",
1228+
"text": [
1229+
"b : int\n"
1230+
]
1231+
},
1232+
{
1233+
"name": "stdout",
1234+
"output_type": "stream",
1235+
"text": [
1236+
" the 2nd number to add (default: 0)\n"
1237+
]
1238+
},
1239+
{
1240+
"name": "stdout",
1241+
"output_type": "stream",
1242+
"text": [
1243+
"\n"
1244+
]
1245+
},
1246+
{
1247+
"name": "stdout",
1248+
"output_type": "stream",
1249+
"text": [
1250+
"Returns\n"
1251+
]
1252+
},
1253+
{
1254+
"name": "stdout",
1255+
"output_type": "stream",
1256+
"text": [
1257+
"-------\n"
1258+
]
1259+
},
1260+
{
1261+
"name": "stdout",
1262+
"output_type": "stream",
1263+
"text": [
1264+
"int\n"
1265+
]
1266+
},
1267+
{
1268+
"name": "stdout",
1269+
"output_type": "stream",
1270+
"text": [
11871271
" the result of adding `a` to `b`\n"
11881272
]
11891273
}
@@ -1471,8 +1555,20 @@
14711555
"name": "stdout",
14721556
"output_type": "stream",
14731557
"text": [
1474-
"def flexiclass(\n",
1475-
" cls # The class to convert\n",
1558+
"def flexiclass(\n"
1559+
]
1560+
},
1561+
{
1562+
"name": "stdout",
1563+
"output_type": "stream",
1564+
"text": [
1565+
" cls # The class to convert\n"
1566+
]
1567+
},
1568+
{
1569+
"name": "stdout",
1570+
"output_type": "stream",
1571+
"text": [
14761572
" ) -> dataclass:\n"
14771573
]
14781574
}
@@ -1510,8 +1606,20 @@
15101606
"name": "stdout",
15111607
"output_type": "stream",
15121608
"text": [
1513-
"def multi(a, b=1,\n",
1514-
" c=2,\n",
1609+
"def multi(a, b=1,\n"
1610+
]
1611+
},
1612+
{
1613+
"name": "stdout",
1614+
"output_type": "stream",
1615+
"text": [
1616+
" c=2,\n"
1617+
]
1618+
},
1619+
{
1620+
"name": "stdout",
1621+
"output_type": "stream",
1622+
"text": [
15151623
" d=3):\n"
15161624
]
15171625
}
@@ -2144,9 +2252,27 @@
21442252
"name": "stdout",
21452253
"output_type": "stream",
21462254
"text": [
2147-
"def foo(\n",
2148-
" a:int, # first\n",
2149-
" b:str, c, # third\n",
2255+
"def foo(\n"
2256+
]
2257+
},
2258+
{
2259+
"name": "stdout",
2260+
"output_type": "stream",
2261+
"text": [
2262+
" a:int, # first\n"
2263+
]
2264+
},
2265+
{
2266+
"name": "stdout",
2267+
"output_type": "stream",
2268+
"text": [
2269+
" b:str, c, # third\n"
2270+
]
2271+
},
2272+
{
2273+
"name": "stdout",
2274+
"output_type": "stream",
2275+
"text": [
21502276
")->int:\n"
21512277
]
21522278
}
@@ -2350,11 +2476,41 @@
23502476
"name": "stdout",
23512477
"output_type": "stream",
23522478
"text": [
2353-
"def _d(\n",
2354-
" c:int, # First\n",
2355-
" b:str, # Second\n",
2356-
" a:int=2, z:str='b', # Last\n",
2357-
")->int: # Return an int\n",
2479+
"def _d(\n"
2480+
]
2481+
},
2482+
{
2483+
"name": "stdout",
2484+
"output_type": "stream",
2485+
"text": [
2486+
" c:int, # First\n"
2487+
]
2488+
},
2489+
{
2490+
"name": "stdout",
2491+
"output_type": "stream",
2492+
"text": [
2493+
" b:str, # Second\n"
2494+
]
2495+
},
2496+
{
2497+
"name": "stdout",
2498+
"output_type": "stream",
2499+
"text": [
2500+
" a:int=2, z:str='b', # Last\n"
2501+
]
2502+
},
2503+
{
2504+
"name": "stdout",
2505+
"output_type": "stream",
2506+
"text": [
2507+
")->int: # Return an int\n"
2508+
]
2509+
},
2510+
{
2511+
"name": "stdout",
2512+
"output_type": "stream",
2513+
"text": [
23582514
"\n"
23592515
]
23602516
}

0 commit comments

Comments
 (0)