From 91ac1d2557d1d2dcf4f67757aa09e30adc554a3f Mon Sep 17 00:00:00 2001 From: Eugene Triguba Date: Fri, 5 Jun 2026 21:51:22 -0400 Subject: Clean up unused imports in cli --- nb/cli.py | 3 +-- nbs/cli.ipynb | 17 +++++++++++------ 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/nb/cli.py b/nb/cli.py index 350ca3c..749583d 100644 --- a/nb/cli.py +++ b/nb/cli.py @@ -1,13 +1,12 @@ # AUTOGENERATED! DO NOT EDIT! # cell: a62b4fb4 -import argparse,contextlib,json,sys +import argparse from pathlib import Path import nbformat from nb import export_nb,clean_nb -from nb.core import read_nb from nb.config import get_config,Config # cell: 96737c5a diff --git a/nbs/cli.ipynb b/nbs/cli.ipynb index 7126e7c..8a7270e 100644 --- a/nbs/cli.ipynb +++ b/nbs/cli.ipynb @@ -40,13 +40,12 @@ "outputs": [], "source": [ "#| export\n", - "import argparse,contextlib,json,sys\n", + "import argparse\n", "from pathlib import Path\n", "\n", "import nbformat\n", "\n", "from nb import export_nb,clean_nb\n", - "from nb.core import read_nb\n", "from nb.config import get_config,Config" ] }, @@ -57,8 +56,8 @@ "metadata": {}, "outputs": [], "source": [ - "import tempfile\n", - "import uuid\n", + "import contextlib,json,sys,tempfile,uuid\n", + "from nb.core import read_nb\n", "from nb import test" ] }, @@ -219,7 +218,7 @@ } ], "source": [ - "with test.raises(exc=SystemExit, contains='1'): run_cli()" + "with test.env(NO_COLOR='1'), test.raises(exc=SystemExit, contains='1'): run_cli()" ] }, { @@ -342,7 +341,13 @@ ] } ], - "metadata": {}, + "metadata": { + "kernelspec": { + "display_name": "python3", + "language": "python", + "name": "python3" + } + }, "nbformat": 4, "nbformat_minor": 5 } -- cgit v1.2.3