CompleterPython: fixed an inaccuracy causing plain classes (i.e. class foo:) not to be detected. eric7

Fri, 28 Apr 2023 14:57:14 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Fri, 28 Apr 2023 14:57:14 +0200
branch
eric7
changeset 9991
814552ada1fb
parent 9987
4fc496b56772
child 9992
3d2f1101a23a

CompleterPython: fixed an inaccuracy causing plain classes (i.e. class foo:) not to be detected.

src/eric7/QScintilla/TypingCompleters/CompleterPython.py file | annotate | diff | comparison | revisions
--- a/src/eric7/QScintilla/TypingCompleters/CompleterPython.py	Fri Apr 21 16:45:32 2023 +0200
+++ b/src/eric7/QScintilla/TypingCompleters/CompleterPython.py	Fri Apr 28 14:57:14 2023 +0200
@@ -38,7 +38,7 @@
         self.__defClsRX = re.compile(
             r"^[ \t]*(def|cdef|cpdef) \w+\([ \t]*cls[ \t]*[,)]"
         )
-        self.__classRX = re.compile(r"^[ \t]*(cdef[ \t]+)?class \w+\(")
+        self.__classRX = re.compile(r"^[ \t]*(cdef[ \t]+)?class \w+[(:]")
         self.__importRX = re.compile(r"^[ \t]*from [\w.]+ ")
         self.__classmethodRX = re.compile(r"^[ \t]*@classmethod")
         self.__staticmethodRX = re.compile(r"^[ \t]*@staticmethod")

eric ide

mercurial