(
lst: list[commands.Command], ignore_hooks: bool, ignore_logs: bool
)
| 79 | |
| 80 | |
| 81 | def _merge_sends( |
| 82 | lst: list[commands.Command], ignore_hooks: bool, ignore_logs: bool |
| 83 | ) -> PlaybookEntryList: |
| 84 | current_send = None |
| 85 | for x in lst: |
| 86 | if isinstance(x, commands.SendData): |
| 87 | if current_send is None or current_send.connection != x.connection: |
| 88 | current_send = x |
| 89 | yield x |
| 90 | else: |
| 91 | current_send.data += x.data |
| 92 | else: |
| 93 | ignore = (ignore_hooks and isinstance(x, commands.StartHook)) or ( |
| 94 | ignore_logs and isinstance(x, commands.Log) |
| 95 | ) |
| 96 | if not ignore: |
| 97 | current_send = None |
| 98 | yield x |
| 99 | |
| 100 | |
| 101 | class _TracebackInPlaybook(commands.Command): |
no outgoing calls
no test coverage detected
searching dependent graphs…