From nobody Mon Feb 9 21:18:57 2026 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 64A8B41B35D for ; Wed, 4 Feb 2026 14:52:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770216753; cv=none; b=BM0Ga1XFQzvJV1aJ5YZezD3Eev6FW7I3h6CSm6GhAKPXUflXw5xJlp0Hzmlkv3fqUmCvV/GhnXH5xQieIDBoS7hnIR4qli+sZW8wXp2Z2op6DRco61nujJBSX9mMRgaZliIdjEwVxtLfGnPIn5WYLCFmPqVFWs2sl3ZJMUjxRt0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770216753; c=relaxed/simple; bh=8BhQ94pNwocXkF1J4tZldasmJvF2BbjLKCc6e/4bvNw=; h=From:To:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=A57DkpYtgG+g6L4rT2C0uVjvhy4oZVlLijP9F4osLeTMiL2TyKDIByTkzQPcAezGMdui/WRqqvQfQiZEIP7Dpj/Q6s7Ee0U8UDoz3qzMGR8TWEKUiP9c8YfB+4H8cI0Pq64OPanTBit93wm0+lWyqIjxJiYH9iGaAcz+5R93uI8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=PkUYyWpz; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="PkUYyWpz" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1770216752; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=+88c6tIz2dzJRW/pA5eB0yGHhQNthhVkp195CIWpCkE=; b=PkUYyWpza1WVgUNl8fSxZMWsGRi/8vfwcgu663C4uSkIgOovrCUQlq/s7ZujJ2Wv4pFSUz LWFNiSR9TQIXeQBkHGBvPAF7lJkxbhOpoz0O6EzXCxWnA9yeb7rx0YVzUVFpXNZHKzwot9 SIiVZn2BzkbrDTJ1E24A1/Y4gzl9Uxs= Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-675-ff8tcclGOF2TwCCfPqda6w-1; Wed, 04 Feb 2026 09:52:29 -0500 X-MC-Unique: ff8tcclGOF2TwCCfPqda6w-1 X-Mimecast-MFC-AGG-ID: ff8tcclGOF2TwCCfPqda6w_1770216748 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 3E4DE1956052; Wed, 4 Feb 2026 14:52:28 +0000 (UTC) Received: from fedora.redhat.com (unknown [10.22.88.140]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id BBC2D30001A5; Wed, 4 Feb 2026 14:52:25 +0000 (UTC) From: Wander Lairson Costa To: Steven Rostedt , Gabriele Monaco , Nam Cao , Wander Lairson Costa , linux-trace-kernel@vger.kernel.org (open list:RUNTIME VERIFICATION (RV)), linux-kernel@vger.kernel.org (open list) Subject: [PATCH v2 08/20] rv/rvgen: fix PEP 8 whitespace violations Date: Wed, 4 Feb 2026 11:42:34 -0300 Message-ID: <20260204144914.104028-9-wander@redhat.com> In-Reply-To: <20260204144914.104028-1-wander@redhat.com> References: <20260204144914.104028-1-wander@redhat.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 Content-Type: text/plain; charset="utf-8" Fix whitespace violations throughout the rvgen codebase to comply with PEP 8 style guidelines. The changes address missing whitespace after commas, around operators, and in collection literals that were flagged by pycodestyle. The fixes include adding whitespace after commas in string replace chains and function arguments, adding whitespace around arithmetic operators, removing extra whitespace in list comprehensions, and fixing dictionary literal spacing. These changes improve code readability and consistency with Python coding standards. Signed-off-by: Wander Lairson Costa Reviewed-by: Gabriele Monaco Reviewed-by: Nam Cao --- tools/verification/rvgen/rvgen/automata.py | 12 ++++++------ tools/verification/rvgen/rvgen/dot2c.py | 2 +- tools/verification/rvgen/rvgen/dot2k.py | 4 ++-- tools/verification/rvgen/rvgen/generator.py | 2 +- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/tools/verification/rvgen/rvgen/automata.py b/tools/verificatio= n/rvgen/rvgen/automata.py index 0d7cbd0c634a9..deb1f09556c3c 100644 --- a/tools/verification/rvgen/rvgen/automata.py +++ b/tools/verification/rvgen/rvgen/automata.py @@ -95,7 +95,7 @@ class Automata: raw_state =3D line[-1] =20 # "enabled_fired"}; -> enabled_fired - state =3D raw_state.replace('"', '').replace('};', '').replace= (',','_') + state =3D raw_state.replace('"', '').replace('};', '').replace= (',', '_') if state[0:7] =3D=3D "__init_": initial_state =3D state[7:] else: @@ -132,7 +132,7 @@ class Automata: # ------------ event is here ------------^^^^^ if self.__dot_lines[cursor].split()[1] =3D=3D "->": line =3D self.__dot_lines[cursor].split() - event =3D line[-2].replace('"','') + event =3D line[-2].replace('"', '') =20 # when a transition has more than one labels, they are lik= e this # "local_irq_enable\nhw_local_irq_enable_n" @@ -162,7 +162,7 @@ class Automata: nr_state +=3D 1 =20 # declare the matrix.... - matrix =3D [[ self.invalid_state_str for x in range(nr_event)] for= y in range(nr_state)] + matrix =3D [[self.invalid_state_str for x in range(nr_event)] for = y in range(nr_state)] =20 # and we are back! Let's fill the matrix cursor =3D self.__get_cursor_begin_events() @@ -170,9 +170,9 @@ class Automata: while self.__dot_lines[cursor].lstrip()[0] =3D=3D '"': if self.__dot_lines[cursor].split()[1] =3D=3D "->": line =3D self.__dot_lines[cursor].split() - origin_state =3D line[0].replace('"','').replace(',','_') - dest_state =3D line[2].replace('"','').replace(',','_') - possible_events =3D line[-2].replace('"','').replace("\\n"= , " ") + origin_state =3D line[0].replace('"', '').replace(',', '_') + dest_state =3D line[2].replace('"', '').replace(',', '_') + possible_events =3D line[-2].replace('"', '').replace("\\n= ", " ") for event in possible_events.split(): matrix[states_dict[origin_state]][events_dict[event]] = =3D dest_state cursor +=3D 1 diff --git a/tools/verification/rvgen/rvgen/dot2c.py b/tools/verification/r= vgen/rvgen/dot2c.py index b3a49779d4cc5..6ab519b03789c 100644 --- a/tools/verification/rvgen/rvgen/dot2c.py +++ b/tools/verification/rvgen/rvgen/dot2c.py @@ -137,7 +137,7 @@ class Dot2c(Automata): line +=3D f"\t\t\t{next_state}" else: line +=3D f"{next_state:>{maxlen}}" - if y !=3D nr_events-1: + if y !=3D nr_events - 1: line +=3D ",\n" if linetoolong else ", " else: line +=3D ",\n\t\t}," if linetoolong else " }," diff --git a/tools/verification/rvgen/rvgen/dot2k.py b/tools/verification/r= vgen/rvgen/dot2k.py index c70a9812abbf6..4bf0db52e6264 100644 --- a/tools/verification/rvgen/rvgen/dot2k.py +++ b/tools/verification/rvgen/rvgen/dot2k.py @@ -111,8 +111,8 @@ class dot2k(Monitor, Dot2c): tp_args =3D tp_args_event if tp_type =3D=3D "event" else tp_args_e= rror if self.monitor_type =3D=3D "per_task": tp_args.insert(0, tp_args_id) - tp_proto_c =3D ", ".join([a+b for a,b in tp_args]) - tp_args_c =3D ", ".join([b for a,b in tp_args]) + tp_proto_c =3D ", ".join([a + b for a, b in tp_args]) + tp_args_c =3D ", ".join([b for a, b in tp_args]) buff.append(f" TP_PROTO({tp_proto_c}),") buff.append(f" TP_ARGS({tp_args_c})") return '\n'.join(buff) diff --git a/tools/verification/rvgen/rvgen/generator.py b/tools/verificati= on/rvgen/rvgen/generator.py index a3fbb1ac74916..31c454329e8e1 100644 --- a/tools/verification/rvgen/rvgen/generator.py +++ b/tools/verification/rvgen/rvgen/generator.py @@ -228,7 +228,7 @@ obj-$(CONFIG_RV_MON_{name_up}) +=3D monitors/{name}/{na= me}.o =20 =20 class Monitor(RVGenerator): - monitor_types =3D { "global" : 1, "per_cpu" : 2, "per_task" : 3 } + monitor_types =3D {"global": 1, "per_cpu": 2, "per_task": 3} =20 def __init__(self, extra_params=3D{}): super().__init__(extra_params) --=20 2.52.0