Re: [RFC PATCH 05/17] verification/rvgen: Annotate DA functions with types

From: Gabriele Monaco
Date: Thu Aug 21 2025 - 04:51:22 EST


On Thu, 2025-08-21 at 10:29 +0200, Nam Cao wrote:
> On Thu, Aug 14, 2025 at 05:07:57PM +0200, Gabriele Monaco wrote:
> > Functions in automata.py, dot2c.py and dot2k.py don't have type
> > annotations and it can get complicated to remember how to use them.
> >
> > Add minimal type annotations.
>
> Nice, Python is sometimes hard to read because the type is not clear.
>
> > -    def __get_event_variables(self):
> > +    def __get_event_variables(self) -> tuple[list[str],
> > list[str]]:
>
> This annotation is wrong. It becomes correct only after your later
> patch
> (verification/rvgen: Add support for Hybrid Automata)

Mmh, good point, that happened after I moved all cleanup patches before
the main changes (this was done after). I'm going to fix that.

Thanks,
Gabriele