Recently I've begun to run pylint on the portage codebase. You can see some
recent PRs on this[0][1][2]. Most of the linter errors I've fixed are what
I consider 'fairly trivial'. In general I'm happy to disable errors (or
instances of errors) in addition to resolving them. You can see some of
this in https://github.com/gentoo/portage/pull/593/files where we just
blanket disable a bunch of very numerous messages (either because I don't
expect to ever fix them, or because they are more work that I think we
should do at the moment.)

So I see essentially a few choices:
 - (a) Do we fix errors in certain classes and run the linter as part of
CI. This means that once we resolve errors of a certain class, we can
enable that class of check and prevent new occurrences.
 - (b) Do we just avoid running the linter as part of CI (perhaps because
we are not far enough along on this journey) and focus our efforts to get
to a point where we can do (a) without spamming CI?
 - (c) What messages should we bother not fixing at all so we can just not
work on those classes of error?

As an example of (c); I believe 'protected-access' is likely intrusive to
fix and pointless for portage (cat is out of the bag) where as a message
like W0612(unused-variable) is plausibly something we should fix
throughout the codebase. Similarly I think "E0602(undefined-variable)" is
often a bug in how pylint treats our lazy initialized variables, so most of
these are false positives.

I think getting these messages recorded will also enable other people
besides me to fix them (I know b-man said he was interested.) Curious to
hear thought on this.



Reply via email to