Skip to content

Commit 1ba077e

Browse files
committed
spacing
1 parent af9fb7c commit 1ba077e

16 files changed

+256
-256
lines changed

nbs/000_tour.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"metadata": {},
88
"outputs": [],
99
"source": [
10-
"#|hide\n",
10+
"#| hide\n",
1111
"from nbdev.showdoc import *\n",
1212
"from fastcore.all import *\n",
1313
"import numpy as np,numbers"

nbs/00_test.ipynb

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"metadata": {},
88
"outputs": [],
99
"source": [
10-
"#|default_exp test"
10+
"#| default_exp test"
1111
]
1212
},
1313
{
@@ -30,7 +30,7 @@
3030
"metadata": {},
3131
"outputs": [],
3232
"source": [
33-
"#|hide\n",
33+
"#| hide\n",
3434
"from nbdev.showdoc import *\n",
3535
"from fastcore.nb_imports import *"
3636
]
@@ -320,7 +320,7 @@
320320
"metadata": {},
321321
"outputs": [],
322322
"source": [
323-
"#|hide\n",
323+
"#| hide\n",
324324
"import pandas as pd\n",
325325
"import torch"
326326
]
@@ -795,7 +795,7 @@
795795
"metadata": {},
796796
"outputs": [],
797797
"source": [
798-
"#|hide\n",
798+
"#| hide\n",
799799
"def _f():\n",
800800
" with ExceptionExpected(): 1\n",
801801
"test_fail(partial(_f))\n",
@@ -824,8 +824,8 @@
824824
"metadata": {},
825825
"outputs": [],
826826
"source": [
827-
"#|hide\n",
828-
"#|eval: false\n",
827+
"#| hide\n",
828+
"#| eval: false\n",
829829
"from nbdev import nbdev_export\n",
830830
"nbdev_export()"
831831
]

nbs/01_basics.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"metadata": {},
88
"outputs": [],
99
"source": [
10-
"#|default_exp basics"
10+
"#| default_exp basics"
1111
]
1212
},
1313
{

nbs/02_foundation.ipynb

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"metadata": {},
77
"outputs": [],
88
"source": [
9-
"#|default_exp foundation"
9+
"#| default_exp foundation"
1010
]
1111
},
1212
{
@@ -15,7 +15,7 @@
1515
"metadata": {},
1616
"outputs": [],
1717
"source": [
18-
"#|export\n",
18+
"#| export\n",
1919
"from fastcore.imports import *\n",
2020
"from fastcore.basics import *\n",
2121
"from functools import lru_cache\n",
@@ -31,7 +31,7 @@
3131
"metadata": {},
3232
"outputs": [],
3333
"source": [
34-
"#|hide\n",
34+
"#| hide\n",
3535
"from fastcore.test import *\n",
3636
"from nbdev.showdoc import *\n",
3737
"from fastcore.nb_imports import *"
@@ -59,7 +59,7 @@
5959
"metadata": {},
6060
"outputs": [],
6161
"source": [
62-
"#|export\n",
62+
"#| export\n",
6363
"@contextmanager\n",
6464
"def working_directory(path):\n",
6565
" \"Change working directory to `path` and return to previous on exit.\"\n",
@@ -75,7 +75,7 @@
7575
"metadata": {},
7676
"outputs": [],
7777
"source": [
78-
"#|export\n",
78+
"#| export\n",
7979
"def add_docs(cls, cls_doc=None, **docs):\n",
8080
" \"Copy values from `docs` to `cls` docstrings, and confirm all public methods are documented\"\n",
8181
" if cls_doc is not None: cls.__doc__ = cls_doc\n",
@@ -173,7 +173,7 @@
173173
"metadata": {},
174174
"outputs": [],
175175
"source": [
176-
"#|hide\n",
176+
"#| hide\n",
177177
"class _T:\n",
178178
" def f(self): pass\n",
179179
" @classmethod\n",
@@ -191,7 +191,7 @@
191191
"metadata": {},
192192
"outputs": [],
193193
"source": [
194-
"#|export\n",
194+
"#| export\n",
195195
"def docs(cls):\n",
196196
" \"Decorator version of `add_docs`, using `_docs` dict\"\n",
197197
" add_docs(cls, **cls._docs)\n",
@@ -303,7 +303,7 @@
303303
"metadata": {},
304304
"outputs": [],
305305
"source": [
306-
"#|export\n",
306+
"#| export\n",
307307
"def coll_repr(c, max_n=20):\n",
308308
" \"String repr of up to `max_n` items of (possibly lazy) collection `c`\"\n",
309309
" return f'(#{len(c)}) [' + ','.join(itertools.islice(map(repr,c), max_n)) + (\n",
@@ -337,7 +337,7 @@
337337
"metadata": {},
338338
"outputs": [],
339339
"source": [
340-
"#|export\n",
340+
"#| export\n",
341341
"def is_bool(x):\n",
342342
" \"Check whether `x` is a bool or None\"\n",
343343
" return isinstance(x,(bool,NoneType)) or risinstance('bool_', x)"
@@ -349,7 +349,7 @@
349349
"metadata": {},
350350
"outputs": [],
351351
"source": [
352-
"#|export\n",
352+
"#| export\n",
353353
"def mask2idxs(mask):\n",
354354
" \"Convert bool mask or index list to index `L`\"\n",
355355
" if isinstance(mask,slice): return mask\n",
@@ -378,7 +378,7 @@
378378
"metadata": {},
379379
"outputs": [],
380380
"source": [
381-
"#|export\n",
381+
"#| export\n",
382382
"def cycle(o):\n",
383383
" \"Like `itertools.cycle` except creates list of `None`s if `o` is empty\"\n",
384384
" o = listify(o)\n",
@@ -403,7 +403,7 @@
403403
"metadata": {},
404404
"outputs": [],
405405
"source": [
406-
"#|export\n",
406+
"#| export\n",
407407
"def zip_cycle(x, *args):\n",
408408
" \"Like `itertools.zip_longest` but `cycle`s through elements of all but first argument\"\n",
409409
" return zip(x, *map(cycle,args))"
@@ -424,7 +424,7 @@
424424
"metadata": {},
425425
"outputs": [],
426426
"source": [
427-
"#|export\n",
427+
"#| export\n",
428428
"def is_indexer(idx):\n",
429429
" \"Test whether `idx` will index a single item in a list\"\n",
430430
" return isinstance(idx,int) or not getattr(idx,'ndim',1)"
@@ -549,7 +549,7 @@
549549
"metadata": {},
550550
"outputs": [],
551551
"source": [
552-
"#|export\n",
552+
"#| export\n",
553553
"class CollBase:\n",
554554
" \"Base class for composing a list of `items`\"\n",
555555
" def __init__(self, items): self.items = items\n",
@@ -597,7 +597,7 @@
597597
"metadata": {},
598598
"outputs": [],
599599
"source": [
600-
"#|export\n",
600+
"#| export\n",
601601
"class _L_Meta(type):\n",
602602
" def __call__(cls, x=None, *args, **kwargs):\n",
603603
" if not args and not kwargs and x is not None and isinstance(x,cls): return x\n",
@@ -610,7 +610,7 @@
610610
"metadata": {},
611611
"outputs": [],
612612
"source": [
613-
"#|export\n",
613+
"#| export\n",
614614
"class L(GetAttr, CollBase, metaclass=_L_Meta):\n",
615615
" \"Behaves like a list of `items` but can also index with list of indices or masks\"\n",
616616
" _default='items'\n",
@@ -719,7 +719,7 @@
719719
"metadata": {},
720720
"outputs": [],
721721
"source": [
722-
"#|export\n",
722+
"#| export\n",
723723
"add_docs(L,\n",
724724
" __getitem__=\"Retrieve `idx` (can be list of indices, or mask, or int) items\",\n",
725725
" range=\"Class Method: Same as `range`, but returns `L`. Can pass collection for `a`, to use `len(a)`\",\n",
@@ -760,8 +760,8 @@
760760
"metadata": {},
761761
"outputs": [],
762762
"source": [
763-
"#|export\n",
764-
"#|hide\n",
763+
"#| export\n",
764+
"#| hide\n",
765765
"# Here we are fixing the signature of L. What happens is that the __call__ method on the MetaClass of L shadows the __init__\n",
766766
"# giving the wrong signature (https://stackoverflow.com/questions/49740290/call-from-metaclass-shadows-signature-of-init).\n",
767767
"def _f(items=None, *rest, use_list=False, match=None): ...\n",
@@ -774,7 +774,7 @@
774774
"metadata": {},
775775
"outputs": [],
776776
"source": [
777-
"#|export\n",
777+
"#| export\n",
778778
"Sequence.register(L);"
779779
]
780780
},
@@ -896,7 +896,7 @@
896896
"metadata": {},
897897
"outputs": [],
898898
"source": [
899-
"#|hide\n",
899+
"#| hide\n",
900900
"# test set items with L of collections\n",
901901
"x = L([[1,2,3], [4,5], [6,7]])\n",
902902
"x[0] = [1,2]\n",
@@ -2307,7 +2307,7 @@
23072307
"metadata": {},
23082308
"outputs": [],
23092309
"source": [
2310-
"#|export\n",
2310+
"#| export\n",
23112311
"def save_config_file(file, d, **kwargs):\n",
23122312
" \"Write settings dict to a new config file, or overwrite the existing one.\"\n",
23132313
" config = ConfigParser(**kwargs)\n",
@@ -2321,7 +2321,7 @@
23212321
"metadata": {},
23222322
"outputs": [],
23232323
"source": [
2324-
"#|export\n",
2324+
"#| export\n",
23252325
"def read_config_file(file, **kwargs):\n",
23262326
" config = ConfigParser(**kwargs)\n",
23272327
" config.read(file, encoding='utf8')\n",
@@ -2370,7 +2370,7 @@
23702370
"metadata": {},
23712371
"outputs": [],
23722372
"source": [
2373-
"#|export\n",
2373+
"#| export\n",
23742374
"class Config:\n",
23752375
" \"Reading and writing `ConfigParser` ini files\"\n",
23762376
" def __init__(self, cfg_path, cfg_name, create=None, save=True, extra_files=None, types=None, **cfg_kwargs):\n",
@@ -2714,7 +2714,7 @@
27142714
"metadata": {},
27152715
"outputs": [],
27162716
"source": [
2717-
"#|hide\n",
2717+
"#| hide\n",
27182718
"import nbdev; nbdev.nbdev_export()"
27192719
]
27202720
},

0 commit comments

Comments
 (0)