From 45fe801b85710aacf9dcde868272bf9c45bc6b57 Mon Sep 17 00:00:00 2001 From: tgoddessana Date: Tue, 18 Apr 2023 23:10:27 +0900 Subject: [PATCH 1/5] docs : bump version to 0.0.2 --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index f08a471..82ec4c4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,7 +2,7 @@ name = "flask-moreshell" -version = "0.0.1" +version = "0.0.2" description = "flask shell with IPython, BPython, PTPython!" From 9fe935302b5a1c26f3e04ea8b567921befd86f4c Mon Sep 17 00:00:00 2001 From: tgoddessana Date: Tue, 18 Apr 2023 23:10:50 +0900 Subject: [PATCH 2/5] docs : add requirements.txt for dev --- requirements_dev.txt | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 requirements_dev.txt diff --git a/requirements_dev.txt b/requirements_dev.txt new file mode 100644 index 0000000..2334390 --- /dev/null +++ b/requirements_dev.txt @@ -0,0 +1,3 @@ +pytest +black +mypy \ No newline at end of file From 9d90c768fda148c211fd49b4ab789a3becd2dae9 Mon Sep 17 00:00:00 2001 From: tgoddessana Date: Tue, 18 Apr 2023 23:27:40 +0900 Subject: [PATCH 3/5] docs : add twine to requirements.txt --- requirements_dev.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/requirements_dev.txt b/requirements_dev.txt index 2334390..57abb6a 100644 --- a/requirements_dev.txt +++ b/requirements_dev.txt @@ -1,3 +1,4 @@ pytest black -mypy \ No newline at end of file +mypy +twine \ No newline at end of file From 975ba1cca4dca10d288322acf09102a108798026 Mon Sep 17 00:00:00 2001 From: tgoddessana Date: Tue, 18 Apr 2023 23:28:01 +0900 Subject: [PATCH 4/5] refactor : mypy settings --- mypy.ini | 2 ++ setup.py | 2 +- src/flask_moreshell.py | 14 ++++++++++---- 3 files changed, 13 insertions(+), 5 deletions(-) create mode 100644 mypy.ini diff --git a/mypy.ini b/mypy.ini new file mode 100644 index 0000000..fecf03f --- /dev/null +++ b/mypy.ini @@ -0,0 +1,2 @@ +[mypy] +exclude = venv \ No newline at end of file diff --git a/setup.py b/setup.py index 59b1a53..b779aea 100644 --- a/setup.py +++ b/setup.py @@ -1,4 +1,4 @@ -from setuptools import setup +from setuptools import setup # type: ignore[import] setup( entry_points={ diff --git a/src/flask_moreshell.py b/src/flask_moreshell.py index 7e16c71..3811666 100644 --- a/src/flask_moreshell.py +++ b/src/flask_moreshell.py @@ -9,11 +9,17 @@ @click.command(context_settings=dict(ignore_unknown_options=True)) @click.option("--shelltype", type=click.STRING, default=None) @with_appcontext -def shell(shelltype): - """If you have IPython, PYTPython, or BPython installed, run them with your Flask application. +def shell(shelltype: str): + """ + Run `flask shell` command with IPython, BPython, PTPython. + + If you have IPython, PYTPython, or BPython installed, run them with your Flask application. if none of them are installed, this loads the default python shell. - you can specify type of shell with --shelltype option.""" + you can specify type of shell with --shelltype option. + + :param shelltype: type of shell to use. + """ if shelltype: try: if shelltype == "ipython": @@ -71,7 +77,7 @@ def load_ipython(): def load_bpython(): """load bpython shell, with current application.""" - import bpython + import bpython # type: ignore[import] banner = "".join( f"Python {sys.version} on {sys.platform}\n" From 70139eef9e2d5ad6fad915eaef0d50fa7e7dbbeb Mon Sep 17 00:00:00 2001 From: tgoddessana Date: Tue, 18 Apr 2023 23:31:59 +0900 Subject: [PATCH 5/5] bump version to 0.0.2 --- src/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/__init__.py b/src/__init__.py index f102a9c..3b93d0b 100644 --- a/src/__init__.py +++ b/src/__init__.py @@ -1 +1 @@ -__version__ = "0.0.1" +__version__ = "0.0.2"