Fixed an issue in the docstring generator searching for the start of a function/method definition. eric7

Sat, 16 Jul 2022 18:09:30 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Sat, 16 Jul 2022 18:09:30 +0200
branch
eric7
changeset 9237
03c714bd4ebf
parent 9236
db53a9efe7ef
child 9238
a7cbf3d61498

Fixed an issue in the docstring generator searching for the start of a function/method definition.

src/eric7/QScintilla/DocstringGenerator/PyDocstringGenerator.py file | annotate | diff | comparison | revisions
--- 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

eric ide

mercurial