All of lore.kernel.org
 help / color / mirror / Atom feed
From: Markus Armbruster <armbru@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: John Snow <jsnow@redhat.com>, QEMU Developers <qemu-devel@nongnu.org>
Subject: Re: [PATCH v5 09/20] docs/sphinx: Add new qapi-doc Sphinx extension
Date: Tue, 22 Sep 2020 13:47:42 +0200	[thread overview]
Message-ID: <87363arq1t.fsf@dusky.pond.sub.org> (raw)
In-Reply-To: <CAFEAcA8unnV=bQiaks-YnD0LOrfwMx2FQFN=Zf4zshrgccrwAQ@mail.gmail.com> (Peter Maydell's message of "Mon, 21 Sep 2020 17:50:42 +0100")

Peter Maydell <peter.maydell@linaro.org> writes:

> On Fri, 4 Sep 2020 at 15:44, Markus Armbruster <armbru@redhat.com> wrote:
>>
>> $ pycodestyle docs/sphinx/qapidoc.py
>> docs/sphinx/qapidoc.py:42:1: E302 expected 2 blank lines, found 1
>> docs/sphinx/qapidoc.py:50:1: E302 expected 2 blank lines, found 1
>> docs/sphinx/qapidoc.py:74:80: E501 line too long (80 > 79 characters)
>> docs/sphinx/qapidoc.py:388:80: E501 line too long (80 > 79 characters)
>> docs/sphinx/qapidoc.py:391:80: E501 line too long (80 > 79 characters)
>> docs/sphinx/qapidoc.py:430:1: E302 expected 2 blank lines, found 1
>> docs/sphinx/qapidoc.py:489:80: E501 line too long (80 > 79 characters)
>> docs/sphinx/qapidoc.py:495:1: E302 expected 2 blank lines, found 1
>
> All fixed.
>
>> $ PYTHONPATH=scripts pylint docs/sphinx/qapidoc.py
>> ************* Module qapidoc
>> docs/sphinx/qapidoc.py:36:4: E0611: No name 'AutodocReporter' in module 'sphinx.ext.autodoc' (no-name-in-module)
>> docs/sphinx/qapidoc.py:45:10: R1708: Do not raise StopIteration in generator, use return statement instead (stop-iteration-return)
>> docs/sphinx/qapidoc.py:104:4: R0201: Method could be a function (no-self-use)
>> docs/sphinx/qapidoc.py:253:4: R0201: Method could be a function (no-self-use)
>> docs/sphinx/qapidoc.py:34:4: C0412: Imports from package sphinx are not grouped (ungrouped-imports)
>
> Not fixed: I disagree with the linter on all these.
>
> The first and fifth of these are unfixable because they are the
> result of code that is trying to adapt to multiple versions of
> Sphinx (one of which has AutodocReporter and the other of which
> does not).
>
> The second makes no sense and appears to me to be a linter
> bug, because the code doesn't (directly) raise StopIteration.
> In any case the function being complained about is just a
> straight borrowing from pydash.
>
> The third and fourth would mean that two of the 10 or so
> _nodes_for_whatever methods would become functions and
> gratuitously different in call signature from the rest
> just because it happens that the current implementation
> doesn't need 'self'.

As I said, use your judgement.

> (The version of pylint I have also warns about:
>  * comments that say "TODO", both of which are ones that
>    are carried over from the texinfo generator about dropping
>    fallback code when undocumented members are outlawed
>  * methods that are part of the QAPISchemaVisitor
>    interface and apparently have "too many arguments")
>  * single-letter variables
>  * the Use_SSI variable name which is from the kerneldoc plugin
> I'm going to ignore those too.)

John Snow is working on a combination of pylint configuration that suits
us, genuine removal of lint, and the occasional pylint directive to shut
it up when it's wrong.  Informational, don't worry about it now.



  reply	other threads:[~2020-09-22 11:48 UTC|newest]

Thread overview: 62+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-10 19:49 [PATCH v5 00/20] Convert QAPI doc comments to generate rST instead of texinfo Peter Maydell
2020-08-10 19:50 ` [PATCH v5 01/20] qapi/migration.json: Fix indentation Peter Maydell
2020-08-10 19:50 ` [PATCH v5 02/20] qapi: Fix indentation, again Peter Maydell
2020-08-14 18:39   ` Richard Henderson
2020-08-10 19:50 ` [PATCH v5 03/20] qapi/block-core.json: Fix nbd-server-start docs Peter Maydell
2020-08-14 18:39   ` Richard Henderson
2020-08-10 19:50 ` [PATCH v5 04/20] qapi/qapi-schema.json: Put headers in their own doc-comment blocks Peter Maydell
2020-08-10 19:50 ` [PATCH v5 05/20] qapi/machine.json: Escape a literal '*' in doc comment Peter Maydell
2020-08-10 19:50 ` [PATCH v5 06/20] tests/qapi/doc-good.json: Prepare for qapi-doc Sphinx extension Peter Maydell
2020-09-04  8:10   ` Markus Armbruster
2020-09-04 12:17     ` Peter Maydell
2020-08-10 19:50 ` [PATCH v5 07/20] scripts/qapi: Move doc-comment whitespace stripping to doc.py Peter Maydell
2020-08-10 19:50 ` [PATCH v5 08/20] scripts/qapi/parser.py: improve doc comment indent handling Peter Maydell
2020-09-04  9:03   ` Markus Armbruster
2020-09-21 15:06     ` Peter Maydell
2020-09-22  7:27       ` Markus Armbruster
2020-09-22 11:48         ` Peter Maydell
2020-09-22 14:08           ` Markus Armbruster
2020-09-22 15:28     ` Peter Maydell
2020-08-10 19:50 ` [PATCH v5 09/20] docs/sphinx: Add new qapi-doc Sphinx extension Peter Maydell
2020-08-14 18:40   ` Richard Henderson
2020-09-04 12:29   ` Markus Armbruster
2020-09-21 18:06     ` Peter Maydell
2020-09-22 11:42       ` Markus Armbruster
2020-09-24 13:25         ` Peter Maydell
2020-09-24 16:30       ` Peter Maydell
2020-09-25  5:51         ` Markus Armbruster
2020-09-04 14:44   ` Markus Armbruster
2020-09-04 14:52     ` Peter Maydell
2020-09-21 16:50     ` Peter Maydell
2020-09-22 11:47       ` Markus Armbruster [this message]
2020-08-10 19:50 ` [PATCH v5 10/20] docs/interop: Convert qemu-ga-ref to rST Peter Maydell
2020-09-04 13:16   ` Markus Armbruster
2020-09-04 13:18     ` Peter Maydell
2020-09-21 15:30     ` Peter Maydell
2020-09-22 12:00       ` Markus Armbruster
2020-09-22 12:58         ` Peter Maydell
2020-09-22 14:13           ` Markus Armbruster
2020-09-22 14:21             ` Peter Maydell
2020-09-22 14:42               ` Markus Armbruster
2020-08-10 19:50 ` [PATCH v5 11/20] docs/interop: Convert qemu-qmp-ref " Peter Maydell
2020-08-10 19:50 ` [PATCH v5 12/20] qapi: Use rST markup for literal blocks Peter Maydell
2020-09-04 13:02   ` Markus Armbruster
2020-08-10 19:50 ` [PATCH v5 13/20] qga/qapi-schema.json: Add some headings Peter Maydell
2020-08-10 19:50 ` [PATCH v5 14/20] scripts/qapi: Remove texinfo generation support Peter Maydell
2020-09-04 13:37   ` Markus Armbruster
2020-09-24 18:14     ` Peter Maydell
2020-09-25  6:48       ` Markus Armbruster
2020-08-10 19:50 ` [PATCH v5 15/20] docs/devel/qapi-code-gen.txt: Update to new rST backend conventions Peter Maydell
2020-09-17  9:24   ` Markus Armbruster
2020-08-10 19:50 ` [PATCH v5 16/20] Makefile: Remove redundant Texinfo related rules Peter Maydell
2020-08-10 19:50 ` [PATCH v5 17/20] scripts/texi2pod: Delete unused script Peter Maydell
2020-08-10 19:50 ` [PATCH v5 18/20] Remove Texinfo related files from .gitignore and git.orderfile Peter Maydell
2020-08-10 19:50 ` [PATCH v5 19/20] configure: Drop texinfo requirement Peter Maydell
2020-08-10 19:50 ` [PATCH v5 20/20] Remove texinfo dependency from docker and CI configs Peter Maydell
2020-08-27 11:25 ` [PATCH v5 00/20] Convert QAPI doc comments to generate rST instead of texinfo Peter Maydell
2020-09-04 14:34   ` Markus Armbruster
2020-09-04 14:48     ` Peter Maydell
2020-09-04 15:54       ` Markus Armbruster
2020-09-04 16:05         ` Peter Maydell
2020-09-24 14:13           ` Peter Maydell
2020-09-24 14:49             ` Markus Armbruster

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=87363arq1t.fsf@dusky.pond.sub.org \
    --to=armbru@redhat.com \
    --cc=jsnow@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.