(self)
Scans and memoizes all non-trivial entity hooks.
Scans and memoizes all non-trivial entity hooks.
Scans and memoizes all non - trivial entity hooks .
def refresh_entity_hooks(self):
    """Scans and memoizes all non-trivial entity hooks."""
    for hook_name in HOOK_NAMES:
      hooks = []
      for entity in self._task.root_entity.iter_entities():
        entity_hook = getattr(entity, hook_name)
        # Ignore any hook that is a no-op to avoid function call overhead.
        if not _callable_is_trivial(entity_hook):
          hooks.append(entity_hook)
      getattr(self, '_' + hook_name).entity_hooks = hooks
def refresh_entity_hooks ( self ) : for hook_name in HOOK_NAMES : hooks = [ ] for entity in self . _task . root_entity . iter_entities ( ) : entity_hook = getattr ( entity , hook_name ) # Ignore any hook that is a no-op to avoid function call overhead. if not _callable_is_trivial ( entity_hook ) : hooks . append ( entity_hook ) getattr ( self , '_' + hook_name ) . entity_hooks = hooks