public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Donald Hunter <donald.hunter@gmail.com>
To: "Donald Hunter" <donald.hunter@gmail.com>,
	"Jakub Kicinski" <kuba@kernel.org>,
	"David S. Miller" <davem@davemloft.net>,
	"Eric Dumazet" <edumazet@google.com>,
	"Paolo Abeni" <pabeni@redhat.com>,
	"Simon Horman" <horms@kernel.org>,
	"Matthieu Baerts (NGI0)" <matttbe@kernel.org>,
	"Gal Pressman" <gal@nvidia.com>,
	"Jan Stancek" <jstancek@redhat.com>,
	"Hangbin Liu" <liuhangbin@gmail.com>,
	"Nimrod Oren" <noren@nvidia.com>,
	netdev@vger.kernel.org, "Jonathan Corbet" <corbet@lwn.net>,
	"Asbjørn Sloth Tønnesen" <ast@fiberby.net>,
	"Mauro Carvalho Chehab" <mchehab+huawei@kernel.org>,
	"Jacob Keller" <jacob.e.keller@intel.com>,
	"Ruben Wauters" <rubenru09@aol.com>,
	linux-doc@vger.kernel.org
Subject: [PATCH net-next v2 10/13] tools: ynl-gen-c: suppress unhelpful pylint messages
Date: Thu,  8 Jan 2026 16:13:36 +0000	[thread overview]
Message-ID: <20260108161339.29166-11-donald.hunter@gmail.com> (raw)
In-Reply-To: <20260108161339.29166-1-donald.hunter@gmail.com>

Disable pylint messages for too-many-*, too-few-*, docstrings,
broad-exception-* and messages for specific code that won't get changed.

Signed-off-by: Donald Hunter <donald.hunter@gmail.com>
---
 tools/net/ynl/pyynl/ynl_gen_c.py | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/tools/net/ynl/pyynl/ynl_gen_c.py b/tools/net/ynl/pyynl/ynl_gen_c.py
index b517d0c605ad..14d16024fe11 100755
--- a/tools/net/ynl/pyynl/ynl_gen_c.py
+++ b/tools/net/ynl/pyynl/ynl_gen_c.py
@@ -1,5 +1,11 @@
 #!/usr/bin/env python3
 # SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause)
+#
+# pylint: disable=line-too-long, missing-class-docstring, missing-function-docstring
+# pylint: disable=too-many-positional-arguments, too-many-arguments, too-many-statements
+# pylint: disable=too-many-branches, too-many-locals, too-many-instance-attributes
+# pylint: disable=too-many-nested-blocks, too-many-lines, too-few-public-methods
+# pylint: disable=broad-exception-raised, broad-exception-caught, protected-access
 
 import argparse
 import filecmp
@@ -11,6 +17,7 @@ import sys
 import tempfile
 import yaml
 
+# pylint: disable=no-name-in-module,wrong-import-position
 sys.path.append(pathlib.Path(__file__).resolve().parent.as_posix())
 from lib import SpecFamily, SpecAttrSet, SpecAttr, SpecOperation, SpecEnumSet, SpecEnumEntry
 from lib import SpecSubMessage
@@ -183,6 +190,7 @@ class Type(SpecAttr):
         for line in lines:
             ri.cw.p(line)
 
+    # pylint: disable=assignment-from-none
     def arg_member(self, ri):
         member = self._complex_member_type(ri)
         if member:
@@ -280,6 +288,7 @@ class Type(SpecAttr):
 
         code = []
         presence = ''
+        # pylint: disable=consider-using-enumerate
         for i in range(0, len(ref)):
             presence = f"{var}->{'.'.join(ref[:i] + [''])}_present.{ref[i]}"
             # Every layer below last is a nest, so we know it uses bit presence
@@ -414,6 +423,7 @@ class TypeScalar(Type):
         if low < -32768 or high > 32767:
             self.checks['full-range'] = True
 
+    # pylint: disable=too-many-return-statements
     def _attr_policy(self, policy):
         if 'flags-mask' in self.checks or self.is_bitfield:
             if self.is_bitfield:
@@ -1650,6 +1660,7 @@ class CodeWriter:
         if out_file is None:
             self._out = os.sys.stdout
         else:
+            # pylint: disable=consider-using-with
             self._out = tempfile.NamedTemporaryFile('w+')
             self._out_file = out_file
 
-- 
2.52.0


  parent reply	other threads:[~2026-01-08 16:14 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-08 16:13 [PATCH net-next v2 00/13] tools: ynl: clean up pylint issues Donald Hunter
2026-01-08 16:13 ` [PATCH net-next v2 01/13] tools: ynl: pylint suppressions and docstrings Donald Hunter
2026-01-08 16:13 ` [PATCH net-next v2 02/13] tools: ynl: fix pylint redefinition, encoding errors Donald Hunter
2026-01-08 16:13 ` [PATCH net-next v2 03/13] tools: ynl: fix pylint exception warnings Donald Hunter
2026-01-08 16:13 ` [PATCH net-next v2 04/13] tools: ynl: fix pylint dict, indentation, long lines, uninitialised Donald Hunter
2026-01-08 16:13 ` [PATCH net-next v2 05/13] tools: ynl: fix pylint misc warnings Donald Hunter
2026-01-08 16:13 ` [PATCH net-next v2 06/13] tools: ynl: fix pylint global variable related warnings Donald Hunter
2026-01-08 16:13 ` [PATCH net-next v2 07/13] tools: ynl: fix logic errors reported by pylint Donald Hunter
2026-01-08 16:13 ` [PATCH net-next v2 08/13] tools: ynl: ethtool: fix pylint issues Donald Hunter
2026-01-08 16:13 ` [PATCH net-next v2 09/13] tools: ynl: fix pylint issues in ynl_gen_rst Donald Hunter
2026-01-08 16:13 ` Donald Hunter [this message]
2026-01-08 16:13 ` [PATCH net-next v2 11/13] tools: ynl-gen-c: fix pylint warnings for returns, unused, redefined Donald Hunter
2026-01-08 16:13 ` [PATCH net-next v2 12/13] tools: ynl-gen-c: fix pylint None, type, dict, generators, init Donald Hunter
2026-01-08 16:13 ` [PATCH net-next v2 13/13] tools: ynl-gen-c: Fix remaining pylint warnings Donald Hunter
2026-01-09 17:00 ` [PATCH net-next v2 00/13] tools: ynl: clean up pylint issues patchwork-bot+netdevbpf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260108161339.29166-11-donald.hunter@gmail.com \
    --to=donald.hunter@gmail.com \
    --cc=ast@fiberby.net \
    --cc=corbet@lwn.net \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=gal@nvidia.com \
    --cc=horms@kernel.org \
    --cc=jacob.e.keller@intel.com \
    --cc=jstancek@redhat.com \
    --cc=kuba@kernel.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=liuhangbin@gmail.com \
    --cc=matttbe@kernel.org \
    --cc=mchehab+huawei@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=noren@nvidia.com \
    --cc=pabeni@redhat.com \
    --cc=rubenru09@aol.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox