Extract Components from a value (single, list, or None).
(value: Any)
| 111 | |
| 112 | |
| 113 | def _collect_components(value: Any) -> list[Component]: |
| 114 | """Extract Components from a value (single, list, or None).""" |
| 115 | if value is None: |
| 116 | return [] |
| 117 | if isinstance(value, Component): |
| 118 | return [value] |
| 119 | if isinstance(value, (list, tuple)): |
| 120 | return [item for item in value if isinstance(item, Component)] |
| 121 | return [] |
| 122 | |
| 123 | |
| 124 | def find_component( |
no outgoing calls
no test coverage detected
searching dependent graphs…