muffin 1.1.0__tar.gz → 1.1.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {muffin-1.1.0 → muffin-1.1.1}/PKG-INFO +1 -1
- {muffin-1.1.0 → muffin-1.1.1}/muffin/manage.py +10 -2
- {muffin-1.1.0 → muffin-1.1.1}/pyproject.toml +1 -1
- {muffin-1.1.0 → muffin-1.1.1}/README.rst +0 -0
- {muffin-1.1.0 → muffin-1.1.1}/muffin/__init__.py +0 -0
- {muffin-1.1.0 → muffin-1.1.1}/muffin/app.py +0 -0
- {muffin-1.1.0 → muffin-1.1.1}/muffin/constants.py +0 -0
- {muffin-1.1.0 → muffin-1.1.1}/muffin/errors.py +0 -0
- {muffin-1.1.0 → muffin-1.1.1}/muffin/handler.py +0 -0
- {muffin-1.1.0 → muffin-1.1.1}/muffin/plugins.py +0 -0
- {muffin-1.1.0 → muffin-1.1.1}/muffin/py.typed +0 -0
- {muffin-1.1.0 → muffin-1.1.1}/muffin/pytest.py +0 -0
- {muffin-1.1.0 → muffin-1.1.1}/muffin/types.py +0 -0
- {muffin-1.1.0 → muffin-1.1.1}/muffin/utils.py +0 -0
@@ -86,7 +86,7 @@ class Manager:
|
|
86
86
|
|
87
87
|
# We have to use sync mode here because of eventloop conflict with ipython/promt-toolkit
|
88
88
|
def shell(*, ipython: bool = True):
|
89
|
-
"""Start the application
|
89
|
+
"""Start an interactive shell with the application context.
|
90
90
|
|
91
91
|
:param ipython: Use IPython as a shell
|
92
92
|
"""
|
@@ -108,7 +108,7 @@ class Manager:
|
|
108
108
|
self(shell)
|
109
109
|
|
110
110
|
def run(host: str = "localhost", port: int = 5000):
|
111
|
-
"""
|
111
|
+
"""Run the application with the given host and port."""
|
112
112
|
from uvicorn.main import run as urun
|
113
113
|
|
114
114
|
cfg = self.app.cfg
|
@@ -235,6 +235,14 @@ class Manager:
|
|
235
235
|
if prog:
|
236
236
|
self.parser.prog = prog
|
237
237
|
|
238
|
+
# Sort subparsers by name
|
239
|
+
choices_actions = getattr(self.subparsers, "_choices_actions", None)
|
240
|
+
if choices_actions:
|
241
|
+
sorted_actions = sorted(choices_actions, key=lambda a: a.dest)
|
242
|
+
choices_actions.clear()
|
243
|
+
choices_actions.extend(sorted_actions)
|
244
|
+
self.subparsers.metavar = "{" + ",".join(a.dest for a in sorted_actions) + "}"
|
245
|
+
|
238
246
|
ns, _ = self.parser.parse_known_args(args or sys.argv[1:])
|
239
247
|
kwargs = dict(ns._get_kwargs())
|
240
248
|
fn = self.commands.get(kwargs.pop("subparser"))
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|