diff options
author | Aldo Cortesi <aldo@corte.si> | 2017-12-13 10:45:31 +1300 |
---|---|---|
committer | Aldo Cortesi <aldo@corte.si> | 2017-12-13 11:08:14 +1300 |
commit | 4cee1a4f96ef7307e422cf227c8389563323e442 (patch) | |
tree | 9e3febc8771eccf2eb6a228e037715b60ae651a7 /docs/scripting/api.rst | |
parent | 91a297969494aad68eb46163c004734223a4abd1 (diff) | |
download | mitmproxy-4cee1a4f96ef7307e422cf227c8389563323e442.tar.gz mitmproxy-4cee1a4f96ef7307e422cf227c8389563323e442.tar.bz2 mitmproxy-4cee1a4f96ef7307e422cf227c8389563323e442.zip |
commands: formalise a Choice type
This resolves as a string during MyPy checks, but at runtime has an additional
attribute that is a command that returns valid options.
This is very ugly and clumsy, basically because MyPy is super restrictive about
what it accepts as a type. Almost any attempt to construct these types in a
more sophisticated way fails in one way or another. I'm open to suggestions.
Diffstat (limited to 'docs/scripting/api.rst')
0 files changed, 0 insertions, 0 deletions