(
context: Context, layers: Sequence[type[Layer] | tuple[type[Layer], ...]]
)
| 61 | |
| 62 | |
| 63 | def stack_match( |
| 64 | context: Context, layers: Sequence[type[Layer] | tuple[type[Layer], ...]] |
| 65 | ) -> bool: |
| 66 | if len(context.layers) != len(layers): |
| 67 | return False |
| 68 | return all( |
| 69 | expected is Any or isinstance(actual, expected) |
| 70 | for actual, expected in zip(context.layers, layers) |
| 71 | ) |
| 72 | |
| 73 | |
| 74 | class NeedsMoreData(Exception): |
no outgoing calls
searching dependent graphs…