Commits

Anonymous committed 87c75f3

codeassist: handle imported names in CodeassistProposal.parameters

Comments (0)

Files changed (1)

rope/contrib/codeassist.py

 
         Returns None if this completion is not a function.
         """
-        if isinstance(self.pyname, pynames.DefinedName):
-            pyobject = self.pyname.get_object()
+        pyname = self.pyname
+        if isinstance(pyname, pynames.ImportedName):
+            pyname = pyname._get_imported_pyname()
+        if isinstance(pyname, pynames.DefinedName):
+            pyobject = pyname.get_object()
             if isinstance(pyobject, pyobject.AbstractFunction):
                 return pyobject.get_param_names()