On Thu, Feb 05, 2026 at 08:24:40AM +0100, Gabriele Monaco wrote:
> On Wed, 2026-02-04 at 11:42 -0300, Wander Lairson Costa wrote:
> > Add missing `-> str` return type annotations to code generation
> > methods in RVGenerator. These methods return strings, and the missing
> > hints caused errors with static analysis tools.
> > 
> > Signed-off-by: Wander Lairson Costa <[email protected]>
> > ---
> >  tools/verification/rvgen/rvgen/generator.py | 16 ++++++++--------
> >  1 file changed, 8 insertions(+), 8 deletions(-)
> > 
> > diff --git a/tools/verification/rvgen/rvgen/generator.py
> > b/tools/verification/rvgen/rvgen/generator.py
> > index ef6c9150f50c6..4b984869a7b3d 100644
> > --- a/tools/verification/rvgen/rvgen/generator.py
> > +++ b/tools/verification/rvgen/rvgen/generator.py
> > @@ -73,13 +73,13 @@ class RVGenerator:
> >              return f"#include <monitors/{self.parent}/{self.parent}.h>\n"
> >          return ""
> >  
> > -    def fill_tracepoint_handlers_skel(self):
> > +    def fill_tracepoint_handlers_skel(self) -> str:
> >          return "NotImplemented"
> 
> Those are the ones that will raise an exception in a later iteration of this,
> right? I wonder if we really need to touch them now.
> Anyway I'm fine with this if it pleases your tools, thanks.

I was uncertain if I should send now or postpone it, to be fair.

> 
> Reviewed-by: Gabriele Monaco <[email protected]>
> 
> >  
> > -    def fill_tracepoint_attach_probe(self):
> > +    def fill_tracepoint_attach_probe(self) -> str:
> >          return "NotImplemented"
> >  
> > -    def fill_tracepoint_detach_helper(self):
> > +    def fill_tracepoint_detach_helper(self) -> str:
> >          return "NotImplemented"
> >  
> >      def fill_main_c(self):
> > @@ -100,19 +100,19 @@ class RVGenerator:
> >  
> >          return main_c
> >  
> > -    def fill_model_h(self):
> > +    def fill_model_h(self) -> str:
> >          return "NotImplemented"
> >  
> > -    def fill_monitor_class_type(self):
> > +    def fill_monitor_class_type(self) -> str:
> >          return "NotImplemented"
> >  
> > -    def fill_monitor_class(self):
> > +    def fill_monitor_class(self) -> str:
> >          return "NotImplemented"
> >  
> > -    def fill_tracepoint_args_skel(self, tp_type):
> > +    def fill_tracepoint_args_skel(self, tp_type) -> str:
> >          return "NotImplemented"
> >  
> > -    def fill_monitor_deps(self):
> > +    def fill_monitor_deps(self) -> str:
> >          buff = []
> >          buff.append("      # XXX: add dependencies if there")
> >          if self.parent:
> 


Reply via email to