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: <m2o6u98o0t.fsf@gmail.com>
Date: Fri, 27 Jun 2025 11:41:38 +0100
From: Donald Hunter <donald.hunter@...il.com>
To: Mauro Carvalho Chehab <mchehab+huawei@...nel.org>
Cc: Linux Doc Mailing List <linux-doc@...r.kernel.org>,  Jonathan Corbet
 <corbet@....net>,  "Akira Yokosawa" <akiyks@...il.com>,  "Breno Leitao"
 <leitao@...ian.org>,  "David S. Miller" <davem@...emloft.net>,  "Eric
 Dumazet" <edumazet@...gle.com>,  "Ignacio Encinas Rubio"
 <ignacio@...cinas.com>,  "Jan Stancek" <jstancek@...hat.com>,  "Marco
 Elver" <elver@...gle.com>,  "Paolo Abeni" <pabeni@...hat.com>,  "Randy
 Dunlap" <rdunlap@...radead.org>,  "Ruben Wauters" <rubenru09@....com>,
  "Shuah Khan" <skhan@...uxfoundation.org>,  joel@...lfernandes.org,
  linux-kernel-mentees@...ts.linux.dev,  linux-kernel@...r.kernel.org,
  lkmm@...ts.linux.dev,  netdev@...r.kernel.org,  peterz@...radead.org,
  stern@...land.harvard.edu
Subject: Re: [PATCH v8 04/13] tools: ynl_gen_rst.py: cleanup coding style

Mauro Carvalho Chehab <mchehab+huawei@...nel.org> writes:

>      @staticmethod
>      def rst_ref(namespace: str, prefix: str, name: str) -> str:
>          """Add a hyperlink to the document"""
> @@ -119,10 +100,9 @@ class RstFormatters:
>                      'nested-attributes': 'attribute-set',
>                      'struct': 'definition'}
>          if prefix in mappings:
> -            prefix = mappings[prefix]
> +            prefix = mappings.get(prefix, "")

This gives me a sad face because fixing the erroneous pylint warning
makes the code look worse. I'd prefer to either suppress the warning
or to change this:

        if prefix in mappings:
            prefix = mappings[prefix]

to this:

        prefix = mappings.get(prefix, prefix)

But IMHO the intent of the original is clearer.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ