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/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!" diff --git a/requirements_dev.txt b/requirements_dev.txt new file mode 100644 index 0000000..57abb6a --- /dev/null +++ b/requirements_dev.txt @@ -0,0 +1,4 @@ +pytest +black +mypy +twine \ 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/__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" 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"