Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes15kdownloads
comment.py20 linesDownload Raw Back to addons
1from collections.abc import Sequence2 3from mitmproxy import command4from mitmproxy import ctx5from mitmproxy import flow6from mitmproxy.hooks import UpdateHook7 8 9class Comment:10    @command.command("flow.comment")11    def comment(self, flow: Sequence[flow.Flow], comment: str) -> None:12        "Add a comment to a flow"13 14        updated = []15        for f in flow:16            f.comment = comment17            updated.append(f)18 19        ctx.master.addons.trigger(UpdateHook(updated))20 
codekingpro/portable-devtools · Team Ai