diff mbox series

[v4,4/4] qapi: update pylint configuration

Message ID 20230203184733.523522-5-jsnow@redhat.com
State New
Headers show
Series qapi: static typing conversion, "pt0" | expand

Commit Message

John Snow Feb. 3, 2023, 6:47 p.m. UTC
Newer versions of pylint disable the "no-self-use" message by
default. Older versions don't, though. If we leave the suppressions in,
pylint yelps about useless options. Just tell pylint to shush.

Signed-off-by: John Snow <jsnow@redhat.com>
---
 scripts/qapi/pylintrc | 1 +
 1 file changed, 1 insertion(+)

Comments

Markus Armbruster Feb. 4, 2023, 11:34 a.m. UTC | #1
John Snow <jsnow@redhat.com> writes:

> Newer versions of pylint disable the "no-self-use" message by
> default. Older versions don't, though. If we leave the suppressions in,
> pylint yelps about useless options. Just tell pylint to shush.
>
> Signed-off-by: John Snow <jsnow@redhat.com>
> ---
>  scripts/qapi/pylintrc | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/scripts/qapi/pylintrc b/scripts/qapi/pylintrc
> index a7246282030..90546df5345 100644
> --- a/scripts/qapi/pylintrc
> +++ b/scripts/qapi/pylintrc
> @@ -23,6 +23,7 @@ disable=fixme,
>          too-many-statements,
>          too-many-instance-attributes,
>          consider-using-f-string,
> +        useless-option-value,
>  
>  [REPORTS]

Pylint docs[*] explains this is "used when a value for an option that is
now deleted from pylint is encountered."  Switching that off makes sense
when you have to deal with a range of versions.  Occasional garbage
collection of old options is advised :)

Reviewed-by: Markus Armbruster <armbru@redhat.com>


[*] https://pylint.pycqa.org/en/latest/user_guide/messages/refactor/useless-option-value.html
John Snow Feb. 6, 2023, 3:59 p.m. UTC | #2
On Sat, Feb 4, 2023, 6:34 AM Markus Armbruster <armbru@redhat.com> wrote:

> John Snow <jsnow@redhat.com> writes:
>
> > Newer versions of pylint disable the "no-self-use" message by
> > default. Older versions don't, though. If we leave the suppressions in,
> > pylint yelps about useless options. Just tell pylint to shush.
> >
> > Signed-off-by: John Snow <jsnow@redhat.com>
> > ---
> >  scripts/qapi/pylintrc | 1 +
> >  1 file changed, 1 insertion(+)
> >
> > diff --git a/scripts/qapi/pylintrc b/scripts/qapi/pylintrc
> > index a7246282030..90546df5345 100644
> > --- a/scripts/qapi/pylintrc
> > +++ b/scripts/qapi/pylintrc
> > @@ -23,6 +23,7 @@ disable=fixme,
> >          too-many-statements,
> >          too-many-instance-attributes,
> >          consider-using-f-string,
> > +        useless-option-value,
> >
> >  [REPORTS]
>
> Pylint docs[*] explains this is "used when a value for an option that is
> now deleted from pylint is encountered."  Switching that off makes sense
> when you have to deal with a range of versions.  Occasional garbage
> collection of old options is advised :)
>

Indeed.

For the purposes of CI and repeatability (and maintainer happiness), it'd
be nice to just enforce specific, explicit versions.

For the purposes of developer happiness, I'm willing to accept *some* pain
in supporting a range of versions for the tools.

I'm anticipating re-evaluating suppressions and workarounds when 3.6 gets
dropped.

--js


> Reviewed-by: Markus Armbruster <armbru@redhat.com>
>
>
> [*]
> https://pylint.pycqa.org/en/latest/user_guide/messages/refactor/useless-option-value.html
>
>
diff mbox series

Patch

diff --git a/scripts/qapi/pylintrc b/scripts/qapi/pylintrc
index a7246282030..90546df5345 100644
--- a/scripts/qapi/pylintrc
+++ b/scripts/qapi/pylintrc
@@ -23,6 +23,7 @@  disable=fixme,
         too-many-statements,
         too-many-instance-attributes,
         consider-using-f-string,
+        useless-option-value,
 
 [REPORTS]