Gentoo Archives: gentoo-portage-dev

From: Alec Warner <antarus@g.o>
To: gentoo-portage-dev@l.g.o
Subject: [gentoo-portage-dev] pylint progress
Date: Wed, 29 Jul 2020 22:14:45
1 Hi,
3 Recently I've begun to run pylint on the portage codebase. You can see some
4 recent PRs on this[0][1][2]. Most of the linter errors I've fixed are what
5 I consider 'fairly trivial'. In general I'm happy to disable errors (or
6 instances of errors) in addition to resolving them. You can see some of
7 this in where we just
8 blanket disable a bunch of very numerous messages (either because I don't
9 expect to ever fix them, or because they are more work that I think we
10 should do at the moment.)
12 So I see essentially a few choices:
13 - (a) Do we fix errors in certain classes and run the linter as part of
14 CI. This means that once we resolve errors of a certain class, we can
15 enable that class of check and prevent new occurrences.
16 - (b) Do we just avoid running the linter as part of CI (perhaps because
17 we are not far enough along on this journey) and focus our efforts to get
18 to a point where we can do (a) without spamming CI?
19 - (c) What messages should we bother not fixing at all so we can just not
20 work on those classes of error?
22 As an example of (c); I believe 'protected-access' is likely intrusive to
23 fix and pointless for portage (cat is out of the bag) where as a message
24 like W0612(unused-variable) is plausibly something we should fix
25 throughout the codebase. Similarly I think "E0602(undefined-variable)" is
26 often a bug in how pylint treats our lazy initialized variables, so most of
27 these are false positives.
29 I think getting these messages recorded will also enable other people
30 besides me to fix them (I know b-man said he was interested.) Curious to
31 hear thought on this.
33 -A
35 [0]
37 [1]
39 [2]


Subject Author
Re: [gentoo-portage-dev] pylint progress Zac Medico <zmedico@g.o>