lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87343xirf9.fsf@yellow.woof>
Date: Thu, 22 Jan 2026 16:43:38 +0100
From: Nam Cao <namcao@...utronix.de>
To: Wander Lairson Costa <wander@...hat.com>, Steven Rostedt
 <rostedt@...dmis.org>, Gabriele Monaco <gmonaco@...hat.com>, Wander
 Lairson Costa <wander@...hat.com>, open list
 <linux-kernel@...r.kernel.org>, "open list:RUNTIME VERIFICATION (RV)"
 <linux-trace-kernel@...r.kernel.org>
Subject: Re: [PATCH 23/26] rv/rvgen: add type annotations to fix pyright errors

Wander Lairson Costa <wander@...hat.com> writes:

> Add return type annotations to RVGenerator base class methods and
> LTL operator classes to resolve pyright reportIncompatibleMethodOverride
> errors.
>
> In generator.py, add string return type annotations to all template
> filling methods and annotate the template_dir class attribute to enable
> proper type checking during initialization.
>
> In ltl2ba.py, introduce a LTLNode type alias as a Union of all AST node
> types (BinaryOp, UnaryOp, Variable, Literal) to properly type operator
> transformations. The operator base classes BinaryOp and UnaryOp receive
> return type annotations using this type alias for their normalize and
> negate methods, since these transformations can return different node
> types depending on the expression. The Variable and Literal classes gain
> return type annotations for their manipulation methods, and all temporal
> checking methods are annotated to return bool.
>
> The LTLNode type alias is necessary because operator transformations are
> polymorphic: NotOp.negate() can return BinaryOp, UnaryOp, Variable, or
> Literal depending on what expression is being negated.
>
> In ltl2k.py, fix the _fill_states return type from str to list[str] to
> match the actual implementation.
>
> Signed-off-by: Wander Lairson Costa <wander@...hat.com>

Reviewed-by: Nam Cao <namcao@...utronix.de>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ