In order to make passes easy to visualise in mtriage-viewer (and to not require replicating etype casting in the production server), each batch needs a simple '.mtbatch' file created, in addition to the elements it produces, which contains simple config info about what Etype the elements in the batch are.
The simplest way to do this, I think, is to add a couple of lines of code at the end of Analyser.__post_analyse which reads the type hints on the analyser in question, and writes the appropriate type to .mtbatch.
The mypy library looks relevant here, but I shouldn't have to add an entire library just to read the type hint....
In order to make passes easy to visualise in mtriage-viewer (and to not require replicating etype casting in the production server), each batch needs a simple '.mtbatch' file created, in addition to the elements it produces, which contains simple config info about what Etype the elements in the batch are.
The simplest way to do this, I think, is to add a couple of lines of code at the end of
Analyser.__post_analyse
which reads the type hints on the analyser in question, and writes the appropriate type to .mtbatch.The mypy library looks relevant here, but I shouldn't have to add an entire library just to read the type hint....