aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEugene Triguba <hello@eugenetriguba.com>2026-05-23 16:39:09 +0000
committerEugene Triguba <hello@eugenetriguba.com>2026-05-23 16:39:09 +0000
commitd4240d8d57826a177911ff39ececf260cb552a94 (patch)
tree6eab01219059e22e61ef8aa7348f526826468022
parentAdd pyproject.toml dir relative config paths (diff)
downloadnb-d4240d8d57826a177911ff39ececf260cb552a94.zip
Align comment and clean up output in export
-rw-r--r--nb/export.py2
-rw-r--r--nbs/export.ipynb8
2 files changed, 4 insertions, 6 deletions
diff --git a/nb/export.py b/nb/export.py
index 4e6bbf5..4c869d2 100644
--- a/nb/export.py
+++ b/nb/export.py
@@ -120,7 +120,7 @@ def mk_py_mod_scaffold(
# cell: f3ab7819
def export_nb(
fp:PathOrFileLike|NotebookNode, # The notebook to export.
- src_dir:str|Path='.', # The source directory to export the Python module to.
+ src_dir:str|Path='.', # The source directory to export the Python module to.
):
"Export the exportable code cells to a Python file."
module, cells = find_cells_to_export(fp)
diff --git a/nbs/export.ipynb b/nbs/export.ipynb
index 3541624..87e7ade 100644
--- a/nbs/export.ipynb
+++ b/nbs/export.ipynb
@@ -234,10 +234,8 @@
" 'execution_count': None,\n",
" 'id': '07ebb5d3',\n",
" 'metadata': {},\n",
- " 'outputs': [{'name': 'stdout',\n",
- " 'output_type': 'stream',\n",
- " 'text': 'The autoreload extension is already loaded. To reload it, use:\\n %reload_ext autoreload\\n'}],\n",
- " 'source': '%load_ext autoreload\\n%autoreload 2'}"
+ " 'outputs': [],\n",
+ " 'source': '%%capture\\n%load_ext autoreload\\n%autoreload 2'}"
]
},
"execution_count": null,
@@ -867,7 +865,7 @@
"#| export\n",
"def export_nb(\n",
" fp:PathOrFileLike|NotebookNode, # The notebook to export.\n",
- " src_dir:str|Path='.', # The source directory to export the Python module to.\n",
+ " src_dir:str|Path='.', # The source directory to export the Python module to.\n",
"):\n",
" \"Export the exportable code cells to a Python file.\"\n",
" module, cells = find_cells_to_export(fp)\n",