File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed
Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -112,19 +112,18 @@ def parsekeywordpairs(signature):
112112 if token is Token .Punctuation :
113113 if value == u'(' :
114114 parendepth += 1
115- elif value == u')' and parendepth :
115+ elif value == u')' :
116116 parendepth -= 1
117- elif value == ':' :
117+ elif value == ':' and parendepth == - 1 :
118118 # End of signature reached
119119 break
120120
121- if parendepth :
121+ if parendepth > 0 :
122122 substack .append (value )
123123 continue
124124
125- if ((token is Token .Punctuation and value == ')' )
126- or (token is Token .Punctuation and value == u',' )
127- and not parendepth ):
125+ if (token is Token .Punctuation and
126+ (value == ',' or (value == ')' and parendepth == - 1 ))):
128127 stack .append (substack [:])
129128 del substack [:]
130129 continue
You can’t perform that action at this time.
0 commit comments