def _Tuple(self, node):
     names = astutils.get_name_levels(node)
     for name, levels in names:
         assignment = None
         if self.assigned_ast is not None:
             assignment = pynames.AssignmentValue(self.assigned_ast, levels)
         self._assigned(name, assignment)
 def _Tuple(self, node):
     names = astutils.get_name_levels(node)
     for name, levels in names:
         assignment = None
         if self.assigned_ast is not None:
             assignment = pynames.AssignmentValue(self.assigned_ast, levels)
         self._assigned(name, assignment)
Exemple #3
0
 def _update_evaluated(self, targets, assigned, evaluation="", eval_type=False):
     result = {}
     names = astutils.get_name_levels(targets)
     for name, levels in names:
         assignment = pynames.AssignmentValue(assigned, levels, evaluation, eval_type)
         self._assigned(name, assignment)
     return result
Exemple #4
0
def _get_evaluated_names(targets, assigned, module, evaluation, lineno):
    result = {}
    for name, levels in astutils.get_name_levels(targets):
        assignment = rope.base.pynames.AssignmentValue(assigned, levels, evaluation)
        # XXX: this module should not access `rope.base.pynamesdef`!
        pyname = rope.base.pynamesdef.AssignedName(lineno, module)
        pyname.assignments.append(assignment)
        result[name] = pyname
    return result
Exemple #5
0
 def _update_evaluated(self, targets, assigned,
                       evaluation= '', eval_type=False):
     result = {}
     names = astutils.get_name_levels(targets)
     for name, levels in names:
         assignment = pynames.AssignmentValue(assigned, levels,
                                              evaluation, eval_type)
         self._assigned(name, assignment)
     return result
Exemple #6
0
def _get_evaluated_names(targets, assigned, module, evaluation, lineno):
    result = {}
    for name, levels in astutils.get_name_levels(targets):
        assignment = rope.base.pynames.AssignmentValue(assigned, levels,
                                                       evaluation)
        # XXX: this module should not access `rope.base.pynamesdef`!
        pyname = rope.base.pynamesdef.AssignedName(lineno, module)
        pyname.assignments.append(assignment)
        result[name] = pyname
    return result
Exemple #7
0
 def _update_evaluated(self, targets, assigned,
                       evaluation='', eval_type=False, type_hint=None):
     result = {}
     if isinstance(targets, str):
         assignment = pynames.AssignmentValue(assigned, [],
                                              evaluation, eval_type)
         self._assigned(targets, assignment)
     else:
         names = astutils.get_name_levels(targets)
         for name, levels in names:
             assignment = pynames.AssignmentValue(assigned, levels,
                                                  evaluation, eval_type)
             self._assigned(name, assignment)
     return result
 def _update_evaluated(self, targets, assigned,
                       evaluation= '', eval_type=False):
     result = {}
     if not isinstance(targets, str):
         names = astutils.get_name_levels(targets)
         for name, levels in names:
             assignment = pynames.AssignmentValue(assigned, levels,
                                                  evaluation, eval_type)
             self._assigned(name, assignment)
     else:
         assignment = pynames.AssignmentValue(assigned, [],
                                              evaluation, eval_type)
         self._assigned(targets, assignment)
     return result