eric6/Utilities/ClassBrowsers/pyclbr.py

changeset 8131
f2129bb79269
parent 8087
db518728761c
child 8205
4a0f1f896341
equal deleted inserted replaced
8130:5fe4ff181b68 8131:f2129bb79269
62 ) 62 )
63 63
64 | (?P<Method> 64 | (?P<Method>
65 ^ 65 ^
66 (?P<MethodIndent> [ \t]* ) 66 (?P<MethodIndent> [ \t]* )
67 (?: async [ \t]+ )? def [ \t]+ 67 (?: async [ \t]+ )? (?: cdef | cpdef | def) [ \t]+
68 (?P<MethodName> \w+ ) 68 (?P<MethodName> \w+ )
69 (?: [ \t]* \[ (?: plain | html ) \] )? 69 (?: [ \t]* \[ (?: plain | html ) \] )?
70 [ \t]* \( 70 [ \t]* \(
71 (?P<MethodSignature> (?: [^)] | \)[ \t]*,? )*? ) 71 (?P<MethodSignature> (?: [^)] | \)[ \t]*,? )*? )
72 \) [ \t]* 72 \) [ \t]*
75 ) 75 )
76 76
77 | (?P<Class> 77 | (?P<Class>
78 ^ 78 ^
79 (?P<ClassIndent> [ \t]* ) 79 (?P<ClassIndent> [ \t]* )
80 (?: cdef [ \t]+ )?
80 class [ \t]+ 81 class [ \t]+
81 (?P<ClassName> \w+ ) 82 (?P<ClassName> \w+ )
82 [ \t]* 83 [ \t]*
83 (?P<ClassSupers> \( [^)]* \) )? 84 (?P<ClassSupers> \( [^)]* \) )?
84 [ \t]* : 85 [ \t]* :
110 (?: (?: if | elif ) [ \t]+ [^:]* | else [ \t]* ) : 111 (?: (?: if | elif ) [ \t]+ [^:]* | else [ \t]* ) :
111 (?= \s* (?: async [ \t]+ )? def) 112 (?= \s* (?: async [ \t]+ )? def)
112 ) 113 )
113 114
114 | (?P<Import> 115 | (?P<Import>
115 ^ [ \t]* (?: import | from [ \t]+ \. [ \t]+ import ) [ \t]+ 116 ^ [ \t]* (?: c? import | from [ \t]+ \. [ \t]+ c? import ) [ \t]+
116 (?P<ImportList> (?: [^#;\\\n]* (?: \\\n )* )* ) 117 (?P<ImportList> (?: [^#;\\\n]* (?: \\\n )* )* )
117 ) 118 )
118 119
119 | (?P<ImportFrom> 120 | (?P<ImportFrom>
120 ^ [ \t]* from [ \t]+ 121 ^ [ \t]* from [ \t]+
123 (?: 124 (?:
124 [ \t]* \. [ \t]* \w+ 125 [ \t]* \. [ \t]* \w+
125 )* 126 )*
126 ) 127 )
127 [ \t]+ 128 [ \t]+
128 import [ \t]+ 129 c? import [ \t]+
129 (?P<ImportFromList> 130 (?P<ImportFromList>
130 (?: \( \s* .*? \s* \) ) 131 (?: \( \s* .*? \s* \) )
131 | 132 |
132 (?: [^#;\\\n]* (?: \\\n )* )* ) 133 (?: [^#;\\\n]* (?: \\\n )* )* )
133 )""", 134 )""",

eric ide

mercurial