Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
constraints : list
The list of constraints.
Yields
------
constraints
The stream of expanded constraints.
"""
for cn in constraints:
if isinstance(cn, DeferredConstraints):
for item in cn.get_constraints(component):
if item is not None:
yield item
else:
if cn is not None and isinstance(cn, Constraint):
yield cn