File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -563,10 +563,10 @@ def parse_arguments(self, line):
563563 arguments = re .search (r'^\s*def\s+\w+\((.*)\)' , line )
564564
565565 # Parse type hints
566- hints = dict (re .findall (r'(\w+)\s*:\s*(\w +\[[^:]*\]|\w +)\s*' , arguments .group (1 )))
566+ hints = dict (re .findall (r'(\w+)\s*:\s*([\w\.] +\[[^:]*\]|[\w\.] +)\s*' , arguments .group (1 )))
567567
568568 # Remove type hints
569- arguments = re .sub (r':\s*(\w +\[[^:]*\]|\w +)\s*' , "" , arguments .group (1 ))
569+ arguments = re .sub (r':\s*([\w\.] +\[[^:]*\]|[\w\.] +)\s*' , "" , arguments .group (1 ))
570570
571571 if not arguments :
572572 return None
@@ -602,7 +602,7 @@ def parse_returns(self, contents):
602602 if len (match ) == 0 :
603603 return None
604604
605- hint = re .search (r'^\s*def\s+\w+\(.*\)\s*->\s*(\w +\[[^:]*\]|\w +)\s*:' , contents )
605+ hint = re .search (r'^\s*def\s+\w+\(.*\)\s*->\s*([\w\.] +\[[^:]*\]|[\w\.] +)\s*:' , contents )
606606 if hint :
607607 hint = hint .group (1 )
608608
You can’t perform that action at this time.
0 commit comments