[PATCH v2 19/20] rv/rvgen: fix _fill_states() return type annotation

Wander Lairson Costa posted 20 patches 4 days, 4 hours ago
[PATCH v2 19/20] rv/rvgen: fix _fill_states() return type annotation
Posted by Wander Lairson Costa 4 days, 4 hours ago
The _fill_states() method returns a list of strings, but the type
annotation incorrectly specified str. Update the annotation to
list[str] to match the actual return value.

Signed-off-by: Wander Lairson Costa <wander@redhat.com>
---
 tools/verification/rvgen/rvgen/ltl2k.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/verification/rvgen/rvgen/ltl2k.py b/tools/verification/rvgen/rvgen/ltl2k.py
index 2c564cc937235..de765b8486bd1 100644
--- a/tools/verification/rvgen/rvgen/ltl2k.py
+++ b/tools/verification/rvgen/rvgen/ltl2k.py
@@ -71,7 +71,7 @@ class ltl2k(generator.Monitor):
         if not self.name:
             self.name = Path(file_path).stem
 
-    def _fill_states(self) -> str:
+    def _fill_states(self) -> list[str]:
         buf = [
             "enum ltl_buchi_state {",
         ]
-- 
2.52.0
Re: [PATCH v2 19/20] rv/rvgen: fix _fill_states() return type annotation
Posted by Gabriele Monaco 3 days, 11 hours ago
On Wed, 2026-02-04 at 11:42 -0300, Wander Lairson Costa wrote:
> The _fill_states() method returns a list of strings, but the type
> annotation incorrectly specified str. Update the annotation to
> list[str] to match the actual return value.
> 
> Signed-off-by: Wander Lairson Costa <wander@redhat.com>
> ---

Looks good, thanks. I would keep all annotation changes together (i.e. squash
with the next patch), but if you prefer this way, I'm fine too.

Reviewed-by: Gabriele Monaco <gmonaco@redhat.com>

>  tools/verification/rvgen/rvgen/ltl2k.py | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tools/verification/rvgen/rvgen/ltl2k.py
> b/tools/verification/rvgen/rvgen/ltl2k.py
> index 2c564cc937235..de765b8486bd1 100644
> --- a/tools/verification/rvgen/rvgen/ltl2k.py
> +++ b/tools/verification/rvgen/rvgen/ltl2k.py
> @@ -71,7 +71,7 @@ class ltl2k(generator.Monitor):
>          if not self.name:
>              self.name = Path(file_path).stem
>  
> -    def _fill_states(self) -> str:
> +    def _fill_states(self) -> list[str]:
>          buf = [
>              "enum ltl_buchi_state {",
>          ]
Re: [PATCH v2 19/20] rv/rvgen: fix _fill_states() return type annotation
Posted by Wander Lairson Costa 2 days, 23 hours ago
On Thu, Feb 05, 2026 at 08:24:11AM +0100, Gabriele Monaco wrote:
> On Wed, 2026-02-04 at 11:42 -0300, Wander Lairson Costa wrote:
> > The _fill_states() method returns a list of strings, but the type
> > annotation incorrectly specified str. Update the annotation to
> > list[str] to match the actual return value.
> > 
> > Signed-off-by: Wander Lairson Costa <wander@redhat.com>
> > ---
> 
> Looks good, thanks. I would keep all annotation changes together (i.e. squash
> with the next patch), but if you prefer this way, I'm fine too.
> 

I don't have strong feelings either way. Feel free to squash them.

> Reviewed-by: Gabriele Monaco <gmonaco@redhat.com>
> 
> >  tools/verification/rvgen/rvgen/ltl2k.py | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/tools/verification/rvgen/rvgen/ltl2k.py
> > b/tools/verification/rvgen/rvgen/ltl2k.py
> > index 2c564cc937235..de765b8486bd1 100644
> > --- a/tools/verification/rvgen/rvgen/ltl2k.py
> > +++ b/tools/verification/rvgen/rvgen/ltl2k.py
> > @@ -71,7 +71,7 @@ class ltl2k(generator.Monitor):
> >          if not self.name:
> >              self.name = Path(file_path).stem
> >  
> > -    def _fill_states(self) -> str:
> > +    def _fill_states(self) -> list[str]:
> >          buf = [
> >              "enum ltl_buchi_state {",
> >          ]
>