From 8e56a4c831932c6ed28a9dfad66daf5c704b4385 Mon Sep 17 00:00:00 2001 From: Marc Bonnici Date: Fri, 13 Nov 2020 16:18:47 +0000 Subject: [PATCH] utils/doc: Fix output for lambda function The "name" can be in the format "." so update to allow correct function with the updated format. --- wa/utils/doc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wa/utils/doc.py b/wa/utils/doc.py index 723b9304..b9b0fb4e 100644 --- a/wa/utils/doc.py +++ b/wa/utils/doc.py @@ -62,7 +62,7 @@ def get_type_name(obj): elif match.group(1) == 'function': text = str(obj) name = text.split()[1] - if name == '': + if name.endswith(''): source = inspect.getsource(obj).strip().replace('\n', ' ') match = re.search(r'lambda\s+(\w+)\s*:\s*(.*?)\s*[\n,]', source) if not match: