def get_targets(self, predicate=None):
    """Returns the candidate targets this task should act on.

    This method is a convenience for processing optional transitivity. Tasks may bypass it
    and make their own decisions on which targets to act on.

    NOTE: This method was introduced in 2018, so at the time of writing few tasks consult it.
          Instead, they query self.context.targets directly.
    TODO: Fix up existing targets to consult this method, for uniformity.

    Note that returned targets have not been checked for invalidation. The caller should do
    so as needed, typically by calling self.invalidated().

    :API: public
    """
    initial_targets = (self.context.targets(predicate) if self.act_transitively
                       else list(filter(predicate, self.context.target_roots)))

    if not self.target_filtering_enabled:
      return initial_targets
    else: 
      return self._filter_targets(initial_targets)
def get_targets ( self , predicate = None ) : initial_targets = ( self . context . targets ( predicate ) if self . act_transitively else list ( filter ( predicate , self . context . target_roots ) ) ) if not self . target_filtering_enabled : return initial_targets else : return self . _filter_targets ( initial_targets )
Returns the candidate targets this task should act on.

    This method is a convenience for processing optional transitivity. Tasks may bypass it
    and make their own decisions on which targets to act on.

    NOTE: This method was introduced in 2018, so at the time of writing few tasks consult it.
          Instead, they query self.context.targets directly.
    TODO: Fix up existing targets to consult this method, for uniformity.

    Note that returned targets have not been checked for invalidation. The caller should do
    so as needed, typically by calling self.invalidated().

    :API: public