def __repr__(self): if self.event_records is not None: event_tags = [ event_record.tag for event_record in self.event_records ] return standard_repr(self, tags=event_tags) return standard_repr(self)
def __repr__(self): return standard_repr(self, self.transform, self.routing_surface, parent=self.parent, joint_name_or_hash=self.joint_name_or_hash, slot_hash=self.slot_hash)
def __repr__(self): if self._debug_name is not None: main_name = self._debug_name elif self._work_entry_element is not None: main_name = str(self._work_entry_element) else: main_name = str(self._work_element) return standard_repr(self, main_name, self.cancel_callable, self.resources, self.additional_resources, self.master_controller, self.running)
def wrapper(*args, **kwargs): key = (args, kwargs) if key in open_calls: func_name = func.__name__ invocation = standard_repr(func_name, *args, **kwargs) raise AssertionError( '{}() does not support recursion. Duplicated call: {}'.format( func_name, invocation)) open_calls.add(key) try: return func(*args, **kwargs) finally: open_calls.remove(key)
def __repr__(self): conditions = [] for condition in self.conditions: if callable(condition) and not isinstance(condition, TunableFactory.TunableFactoryWrapper): conditions.append(callable_repr(condition)) else: conditions.append(condition) kwargs = {} if self.tests is not None: kwargs['tests'] = self.tests kwargs['restrictions'] = self.restrictions kwargs['interaction_action'] = self.interaction_action kwargs['progress_bar_action'] = self.progress_bar_action return standard_repr(self, conditions, **kwargs)
def __repr__(self): conditions = [] for condition in self.conditions: if callable(condition) and not isinstance( condition, TunableFactory.TunableFactoryWrapper): conditions.append(callable_repr(condition)) else: conditions.append(condition) kwargs = {} if self.tests is not None: kwargs['tests'] = self.tests kwargs['restrictions'] = self.restrictions kwargs['interaction_action'] = self.interaction_action kwargs['progress_bar_action'] = self.progress_bar_action return standard_repr(self, conditions, **kwargs)
def __repr__(self): return standard_repr(self, standard_float_tuple_repr(*self.position))
def __repr__(self): items = ', '.join(repr(i) for i in sorted(self)) return standard_repr(self, items)
def __repr__(self): return standard_repr(self, self.texture_name or self.texture_id, self.reveal_level, self.use_overlay)
def __repr__(self): return standard_repr(self, self.owner)
def __repr__(self): return standard_repr(self, self.definition.cls.__name__, self.definition.name or self.definition.id, standard_brief_id_repr(self.id))
class Journal: __qualname__ = 'Journal' JournalEntry = namedtuple('JournalEntry', ('object', 'protocol_buffer', 'manager_id', 'debug_object_name')) JournalEntry.__repr__ = lambda self: standard_repr(self, self.object, self.protocol_buffer, self.manager_id, self.debug_object_name) def __init__(self): self.entries = [] self.deferred_ops = [] self.deferring = False def __repr__(self): return '<Journal ops={}>'.format(self.op_count) @property def op_count(self): return len(self.entries) def start_deferring(self): self.deferring = True def stop_deferring(self): self.deferring = False deferred_ops = self.deferred_ops self.deferred_ops = [] for (_, ((obj, op), entry)) in deferred_ops: if entry is None: entry = self._build_journal_entry(obj, op) self.entries.append(entry) def add(self, obj, op, ignore_deferral=False): for tag in _current_tag_set: op.block_on_tag(tag) op_task_owner = None time_service = services.time_service() if time_service is not None and time_service.sim_timeline is not None: timeline = time_service.sim_timeline current_element = timeline.get_current_element() if isinstance(current_element, reset.ResettableElement): op_task_owner = current_element.obj break if isinstance(current_element, elements.AllElement): break if current_element._parent_handle is None: break current_element = current_element._parent_handle.element continue if op_task_owner is not None and op_task_owner is not obj and (obj is None or op_task_owner.id != obj.id): op_task_owner_manager = getattr(op_task_owner, 'manager', None) if op_task_owner_manager is not None and hasattr(op_task_owner_manager, 'id'): op.add_additional_channel(op_task_owner_manager.id, op_task_owner.id, mask=op._primary_channel_mask_override) op._primary_channel_mask_override = 0 if not self.deferring or ignore_deferral: entry = self._build_journal_entry(obj, op) self.entries.append(entry) return if obj is None or not hasattr(obj, 'ref'): self.deferred_ops.append((None, [(obj, op), None])) return def on_object_deleted(ref): for (other_ref, key_and_entry) in self.deferred_ops: while other_ref == ref: entry = self._build_journal_entry(obj, op) key_and_entry[1] = entry obj_ref = obj.ref(on_object_deleted) self.deferred_ops.append((obj_ref, [(obj, op), None])) def _build_journal_entry(self, obj, op): object_name = None proto_buff = protocolbuffers.DistributorOps_pb2.Operation() if obj is None: object_id = 0 manager_id = MGR_UNMANAGED else: object_id = obj.id manager_id = obj.manager.id mask_override = None if manager_id == MGR_UNMANAGED: mask_override = 0 if op._force_execution_on_tag: mask_override = 0 elif op._primary_channel_mask_override is not None: mask_override = op._primary_channel_mask_override if mask_override is not None and mask_override != DEFAULT_MASK: proto_buff.primary_channel_mask_override = mask_override for channel in op._additional_channels: with ProtocolBufferRollback(proto_buff.additional_channels) as additional_channel_msg: additional_channel_msg.id.manager_id = channel[0] additional_channel_msg.id.object_id = channel[1] additional_channel_msg.mask = channel[2] op.write(proto_buff) entry = Journal.JournalEntry(object_id, proto_buff, manager_id, object_name) return entry def clear(self): del self.entries[:]
def __repr__(self): guid = getattr(self, 'id', None) if guid is not None: return standard_repr(self, standard_brief_id_repr(guid)) return standard_repr(self)
def __repr__(self): return standard_repr(self, tuple(self))
def __repr__(self): return standard_repr(self, stat=self.stat.stat_type.__name__, threshold=self.threshold)
def __repr__(self): return standard_repr(self, stat=self.statistic_type.__name__, threshold=self._threshold, callback=self._callback, trigger_time=self._trigger_time)
def __repr__(self): return standard_repr(self, self.debug_state_name, hex(self.state_name_hash), opacity=self.opacity, transition=self.transition)
def __repr__(self): return standard_repr(self, *self.aspects)
def __repr__(self): return standard_repr(self, self.get_proxied_obj())
def __repr__(self): return standard_repr( self, default_set_part=self.default_set_part, update_genetics=self.update_genetics, expect_invalid_parts=self.expect_invalid_parts)
def __repr__(self): return standard_repr(self, tag_list=self.tag_list)
def __str__(self): return standard_repr(self, '{}.{} {}'.format(self.who.name, self.stat.__name__, self.threshold))
def __repr__(self): return standard_repr(self, self.texture_name or self.texture_id, self.reveal_level, self.use_overlay, self.effect)
def __repr__(self): return standard_repr(self, self.visibility, inherits=self.inherits, enable_drop_shadow=self.enable_drop_shadow)
def __repr__(self): return standard_repr(self, self.polygon, self.restrictions)
def __repr__(self): return standard_repr(self, customized=self.customized, custom_decorations=self.custom_decorations)
def __str__(self): return standard_repr(self, self._debug_name)
def __repr__(self): items = ', '.join(repr(i) for i in self.in_best_order) return standard_repr(self, items)
def __repr__(self): return standard_repr(self, *self)
def __repr__(self): return standard_repr(self, cas_part=self.cas_part, should_toggle=self.should_toggle, replace_with_random=self.replace_with_random, update_genetics=self.update_genetics)
def __repr__(self): return standard_repr(self, body_type=self.body_type)
def __repr__(self): return standard_repr(self, self.message_type)
def __repr__(self): return standard_repr(self, self.id, self.target)