Commits

Anonymous committed 37a61a5

codeassist: handling unknown PyName types when sorting proposals

  • Participants
  • Parent commits d41e479

Comments (0)

Files changed (1)

rope/contrib/codeassist.py

     def _get_pyname_type(self, pyname):
         if isinstance(pyname, builtins.BuiltinName):
             return 'builtin'
-        if isinstance(pyname, (pynames.AssignedName, pynames.UnboundName)):
-            return 'variable'
         if isinstance(pyname, pynames.ImportedName) or \
            isinstance(pyname, pynames.ImportedModule):
             return 'imported'
                 return 'function'
             if isinstance(pyobject, pyobjects.AbstractClass):
                 return 'class'
+        return 'variable'
 
     def _code_completions(self):
         lineno = self.code.count('\n', 0, self.offset) + 1