Skip to content

Commit

Permalink
save application instance
Browse files Browse the repository at this point in the history
  • Loading branch information
tlambert03 committed Dec 31, 2020
1 parent 9cab583 commit 1a95e4f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion magicgui/application.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,5 +165,6 @@ def use_app(app: AppRef = None) -> Application:
elif isinstance(app, Application):
return app
elif isinstance(app, str):
return Application(app)
Application._instance = Application(app)
return Application._instance
raise TypeError(f"'app' must be string, Application, or None, got: {app!r}. ")

0 comments on commit 1a95e4f

Please sign in to comment.