From c5720e14f9713f19feca5ca3627c7ec5a68df88e Mon Sep 17 00:00:00 2001 From: krassowski Date: Sat, 23 Sep 2017 15:01:29 +0000 Subject: [PATCH] Add docstring explaining introduced arguments of _run() --- aqt/__init__.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/aqt/__init__.py b/aqt/__init__.py index 8fc8123d7..ccfde23b3 100644 --- a/aqt/__init__.py +++ b/aqt/__init__.py @@ -234,6 +234,15 @@ def run(): traceback.format_exc()) def _run(argv=None, exec=True): + """Start AnkiQt application or reuse an existing instance if one exists. + + If the function is invoked with exec=False, the AnkiQt will not enter + the main event loop - instead the application object will be returned. + + The 'exec' and 'argv' arguments will be useful for testing purposes. + + If no 'argv' is supplied then 'sys.argv' will be used. + """ global mw if argv is None: