Creates an iterator over the selected connections type which yields
all the defined connections of that type.
Parameters
----------
connections: `PipelineTaskConnections`
An instance of a `PipelineTaskConnections` object that will be iterated
over.
connectionType: `str`
The type of connections to iterate over, valid values are inputs,
outputs, prerequisiteInputs, initInputs, initOutputs.
Yields
-------
connection: `BaseConnection`
A connection defined on the input connections object of the type
supplied. The yielded value Will be an derived type of
`BaseConnection`.
Definition at line 494 of file connections.py.
494 def iterConnections(connections: PipelineTaskConnections, connectionType: str) -> typing.Generator:
495 """Creates an iterator over the selected connections type which yields
496 all the defined connections of that type.
500 connections: `PipelineTaskConnections`
501 An instance of a `PipelineTaskConnections` object that will be iterated
503 connectionType: `str`
504 The type of connections to iterate over, valid values are inputs,
505 outputs, prerequisiteInputs, initInputs, initOutputs.
509 connection: `BaseConnection`
510 A connection defined on the input connections object of the type
511 supplied. The yielded value Will be an derived type of
514 for name
in getattr(connections, connectionType):
515 yield getattr(connections, name)