def eval_trailer(self, types, trailer): trailer_op, node = trailer.children[:2] if node == ')': # `arglist` is optional. node = () new_types = set() if trailer_op == '[': new_types |= iterable.py__getitem__(self, types, trailer) else: for typ in types: debug.dbg('eval_trailer: %s in scope %s', trailer, typ) if trailer_op == '.': new_types |= self.find_types(typ, node) elif trailer_op == '(': new_types |= self.execute(typ, node, trailer) return new_types
def eval_trailer(self, context, types, trailer): trailer_op, node = trailer.children[:2] if node == ')': # `arglist` is optional. node = () new_types = set() if trailer_op == '[': new_types |= iterable.py__getitem__(self, context, types, trailer) else: for typ in types: debug.dbg('eval_trailer: %s in scope %s', trailer, typ) if trailer_op == '.': new_types |= typ.py__getattribute__(name_context=context, name_or_str=node) elif trailer_op == '(': arguments = param.TreeArguments(self, context, node, trailer) new_types |= self.execute(typ, arguments) return new_types
def eval_trailer(self, context, types, trailer): trailer_op, node = trailer.children[:2] if node == ')': # `arglist` is optional. node = () new_types = set() if trailer_op == '[': new_types |= iterable.py__getitem__(self, context, types, trailer) else: for typ in types: debug.dbg('eval_trailer: %s in scope %s', trailer, typ) if trailer_op == '.': new_types |= typ.py__getattribute__( name_context=context, name_or_str=node ) elif trailer_op == '(': arguments = param.TreeArguments(self, context, node, trailer) new_types |= self.execute(typ, arguments) return new_types