Skip to content

Commit

Permalink
Merge pull request #1 from TGoddessana/0.0.2
Browse files Browse the repository at this point in the history
0.0.2 update
  • Loading branch information
TGoddessana authored Apr 18, 2023
2 parents b46030e + 70139ee commit 309cada
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 7 deletions.
2 changes: 2 additions & 0 deletions mypy.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[mypy]
exclude = venv
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

name = "flask-moreshell"

version = "0.0.1"
version = "0.0.2"

description = "flask shell with IPython, BPython, PTPython!"

Expand Down
4 changes: 4 additions & 0 deletions requirements_dev.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
pytest
black
mypy
twine
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from setuptools import setup
from setuptools import setup # type: ignore[import]

setup(
entry_points={
Expand Down
2 changes: 1 addition & 1 deletion src/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.0.1"
__version__ = "0.0.2"
14 changes: 10 additions & 4 deletions src/flask_moreshell.py
Original file line number Diff line number Diff line change
Expand Up @@ -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":
Expand Down Expand Up @@ -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"
Expand Down

0 comments on commit 309cada

Please sign in to comment.