diff -r db53a9efe7ef -r 03c714bd4ebf src/eric7/QScintilla/DocstringGenerator/PyDocstringGenerator.py --- a/src/eric7/QScintilla/DocstringGenerator/PyDocstringGenerator.py Thu Jul 14 16:09:37 2022 +0200 +++ b/src/eric7/QScintilla/DocstringGenerator/PyDocstringGenerator.py Sat Jul 16 18:09:30 2022 +0200 @@ -43,7 +43,7 @@ """ if isinstance(text, str): text = text.lstrip() - if text.startswith(("def", "async def")): + if text.startswith(("def ", "async def ")): return True return False