Source

pycode / pycode / stubgen.py

Diff from to

pycode/stubgen.py

                 elif char == "=":
                     pos += 1
                     yield "EQUALS", "="
+                elif char == ".":
+                    pos += 1
+                    yield "DOT", "."
                 elif char == " ":
                     pos += 1 # skip whitespace
                 #  number = re.match("^\d+(\.\d*)?", s[pos:])
             return
         name = token[1]
         token = next_token()
+        while token[0] == "DOT":
+            token = next_token()
+            if token[0] == "IDENT":
+                name = token[1]
+                token = next_token()                                
+            else:
+                assert token[0] == "LPAREN"
         if token[0] != "LPAREN":
             return
         token = next_token()
             if token[0] == "EQUALS":
                 token = next_token()
                 token = next_token()
-            elif token[0] == "COMMA":
+
+            if token[0] == "COMMA":
                 token = next_token()
             elif token[0] == "COLON":
                 token = next_token()