Compare an indiviual event/command or a list of events/commands.
(
a: PlaybookEntry | Iterable[PlaybookEntry],
b: PlaybookEntry | Iterable[PlaybookEntry],
)
| 56 | |
| 57 | |
| 58 | def eq( |
| 59 | a: PlaybookEntry | Iterable[PlaybookEntry], |
| 60 | b: PlaybookEntry | Iterable[PlaybookEntry], |
| 61 | ): |
| 62 | """ |
| 63 | Compare an indiviual event/command or a list of events/commands. |
| 64 | """ |
| 65 | if isinstance(a, collections.abc.Iterable) and isinstance( |
| 66 | b, collections.abc.Iterable |
| 67 | ): |
| 68 | return all(_eq(x, y) for x, y in itertools.zip_longest(a, b)) |
| 69 | return _eq(a, b) |
| 70 | |
| 71 | |
| 72 | def _fmt_entry(x: PlaybookEntry): |
no test coverage detected