[riot-notifications] [RIOT-OS/RIOT] ci/flake8: fix some issues found by static-tests ran on master (#15720)

Martine Lenders notifications at github.com
Thu Jan 7 18:49:41 CET 2021


@miri64 commented on this pull request.



> +def list_until(trace_list, cond):
+    return trace_list[:([i for i, e in enumerate(trace_list) if cond(e)][0])]

IIRC this can be used generally, not just for trace lists, so just

```suggestion
def list_until(list_, cond):
    return list_[:([i for i, e in enumerate(list_) if cond(e)][0])]
```

Or `lst` or something like that?

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/15720#pullrequestreview-563695259
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20210107/82218d5b/attachment-0001.htm>


More information about the notifications mailing list