mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-30 03:14:22 +00:00
parent
cd913d598d
commit
2649e57691
@ -92,7 +92,7 @@ def typename(t: type, ret: bool) -> str:
|
|||||||
if isinstance(t, Choice):
|
if isinstance(t, Choice):
|
||||||
return "choice"
|
return "choice"
|
||||||
elif t == typing.Sequence[flow.Flow]:
|
elif t == typing.Sequence[flow.Flow]:
|
||||||
return "[flow]" if ret else "flowspec"
|
return "[flow]"
|
||||||
elif t == typing.Sequence[str]:
|
elif t == typing.Sequence[str]:
|
||||||
return "[str]"
|
return "[str]"
|
||||||
elif t == typing.Sequence[Cut]:
|
elif t == typing.Sequence[Cut]:
|
||||||
|
@ -157,7 +157,7 @@ def map(km):
|
|||||||
)
|
)
|
||||||
km.add("e", "console.grideditor.editor", ["grideditor"], "Edit in external editor")
|
km.add("e", "console.grideditor.editor", ["grideditor"], "Edit in external editor")
|
||||||
|
|
||||||
km.add("z", "console.eventlog.clear", ["eventlog"], "Clear")
|
km.add("z", "eventstore.clear", ["eventlog"], "Clear")
|
||||||
|
|
||||||
km.add(
|
km.add(
|
||||||
"a",
|
"a",
|
||||||
|
@ -153,7 +153,7 @@ def test_simple():
|
|||||||
def test_typename():
|
def test_typename():
|
||||||
assert command.typename(str, True) == "str"
|
assert command.typename(str, True) == "str"
|
||||||
assert command.typename(typing.Sequence[flow.Flow], True) == "[flow]"
|
assert command.typename(typing.Sequence[flow.Flow], True) == "[flow]"
|
||||||
assert command.typename(typing.Sequence[flow.Flow], False) == "flowspec"
|
assert command.typename(typing.Sequence[flow.Flow], False) == "[flow]"
|
||||||
|
|
||||||
assert command.typename(command.Cuts, True) == "[cuts]"
|
assert command.typename(command.Cuts, True) == "[cuts]"
|
||||||
assert command.typename(typing.Sequence[command.Cut], False) == "[cut]"
|
assert command.typename(typing.Sequence[command.Cut], False) == "[cut]"
|
||||||
|
Loading…
Reference in New Issue
Block a user