Merge pull request #1108 from jspv/main

Set `argv` when importing app via `textual run`.
This commit is contained in:
Dave Pearson
2022-11-07 08:50:24 +00:00
committed by GitHub

View File

@@ -118,6 +118,8 @@ def import_app(import_name: str) -> App:
except AttributeError:
raise AppFail(f"Unable to find {name!r} in {module!r}")
sys.argv[:] = [import_name, *argv]
if inspect.isclass(app) and issubclass(app, App):
app = app()