From f490b9a8bd210fb5acc9c4b86e3bb0798dbe9074 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Wed, 4 Aug 2021 22:58:05 +0530 Subject: [PATCH] Better error message for get_all_actions() when docstrings are missing --- kitty/actions.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/kitty/actions.py b/kitty/actions.py index 374985063..262750348 100644 --- a/kitty/actions.py +++ b/kitty/actions.py @@ -33,6 +33,14 @@ class Action(NamedTuple): @run_once def get_all_actions() -> Dict[str, List[Action]]: + ' test docstring ' + if not get_all_actions.__doc__: + raise RuntimeError( + 'This build of kitty does not have docstrings, which' + ' are needed for get_all_actions(). If you are using a' + ' kitty binary build, setup KITTY_DEVELOP_FROM' + ' as described here: https://sw.kovidgoyal.net/kitty/build/' + ) ans: Dict[str, List[Action]] = {}