eric6/Utilities/ClassBrowsers/pyclbr.py

changeset 8131
f2129bb79269
parent 8087
db518728761c
child 8205
4a0f1f896341
diff -r 5fe4ff181b68 -r f2129bb79269 eric6/Utilities/ClassBrowsers/pyclbr.py
--- a/eric6/Utilities/ClassBrowsers/pyclbr.py	Tue Feb 23 17:31:36 2021 +0100
+++ b/eric6/Utilities/ClassBrowsers/pyclbr.py	Tue Feb 23 17:38:12 2021 +0100
@@ -64,7 +64,7 @@
 |   (?P<Method>
         ^
         (?P<MethodIndent> [ \t]* )
-        (?: async [ \t]+ )? def [ \t]+
+        (?: async [ \t]+ )? (?: cdef | cpdef | def) [ \t]+
         (?P<MethodName> \w+ )
         (?: [ \t]* \[ (?: plain | html ) \] )?
         [ \t]* \(
@@ -77,6 +77,7 @@
 |   (?P<Class>
         ^
         (?P<ClassIndent> [ \t]* )
+        (?: cdef [ \t]+ )?
         class [ \t]+
         (?P<ClassName> \w+ )
         [ \t]*
@@ -112,7 +113,7 @@
     )
 
 |   (?P<Import>
-        ^ [ \t]* (?: import | from [ \t]+ \. [ \t]+ import ) [ \t]+
+        ^ [ \t]* (?: c? import | from [ \t]+ \. [ \t]+ c? import ) [ \t]+
         (?P<ImportList> (?: [^#;\\\n]* (?: \\\n )* )* )
     )
 
@@ -125,7 +126,7 @@
             )*
         )
         [ \t]+
-        import [ \t]+
+        c? import [ \t]+
         (?P<ImportFromList>
             (?: \( \s* .*? \s* \) )
             |

eric ide

mercurial