[anaconda:master 0/3] Using a pointless overrides checker

Anne Mulhern amulhern at redhat.com
Thu Dec 4 13:41:41 UTC 2014

----- Original Message -----
> From: "Chris Lumens" <clumens at redhat.com>
> To: anaconda-patches at lists.fedorahosted.org
> Sent: Wednesday, December 3, 2014 4:29:55 PM
> Subject: Re: [anaconda:master 0/3] Using a pointless overrides checker
> > The first patch is motivated by the results of the pointless overrides
> > checker.
> > The checker identifies somethings as pointless overrides which aren't
> > really
> > meant to be class attributes at all. It seemed sensible to just refactor
> > all
> > that path calculation into a staticmethod.
> > 
> > The other two patches just add the pylint checker and then remove pointless
> > overrides identified. The checker has to be used with some judgement in
> > when there is multiple inheritance, which occurs with TUIObject, so I did
> > have to check a few by hand. The restrictions of the checker are all
> > documented in the comments.
> I definitely like using pylint to catch more crud like this.  It helps
> improve the quality and clarity of the code by getting rid of things
> that, like you said, are pointless.
> I noticed a fairly busy nested loop or two in
> PointlessClassAttributeOverrideChecker,
> which makes me wonder about the speediness.  Do you have any feeling for
> if it's going to run slowly at all?  I guess in the case of just
> checking a file or two in a commit it'd be fine, but what about running
> across the entire source tree?

I'm so unsophisticated that I always pylint the whole deal.

I ran some tests on blivet with the small sample size of 3.

Results were pretty consistent, and I think they mean that usually the analysis
would add about 1/5th of a second to the typical 18 second completion time.

I suspect that something like the same ratio would hold for anaconda, maybe a bit

<-- SNIP -->

> - Chris
> _______________________________________________
> anaconda-patches mailing list
> anaconda-patches at lists.fedorahosted.org
> https://lists.fedorahosted.org/mailman/listinfo/anaconda-patches

- mulhern

More information about the anaconda-patches mailing list