[blivet:master 12/25] Disable E1003 warning.

Anne Mulhern amulhern at redhat.com
Mon Apr 21 17:25:23 UTC 2014





----- Original Message -----
> From: "David Lehman" <dlehman at redhat.com>
> To: anaconda-patches at lists.fedorahosted.org
> Sent: Monday, April 21, 2014 10:44:10 AM
> Subject: Re: [blivet:master 12/25] Disable E1003 warning.
> 
> 
> On 04/21/2014 07:01 AM, Anne Mulhern wrote:
> >
> >
> >
> > ----- Original Message -----
> >> From: "David Shea" <dshea at redhat.com>
> >> To: anaconda-patches at lists.fedorahosted.org
> >> Sent: Thursday, April 17, 2014 4:31:22 PM
> >> Subject: Re: [blivet:master 12/25] Disable E1003 warning.
> >>
> >> On 04/16/2014 05:54 PM, mulhern wrote:
> >>> This warning is triggered if the first argument to super is anything
> >>> other
> >>> than
> >>> the name of the class. It is intentionally different in this case in
> >>> order
> >>> to
> >>> skip the immediate super class.
> >>>
> >>> Signed-off-by: mulhern <amulhern at redhat.com>
> >>> ---
> >>>    blivet/partitioning.py | 2 +-
> >>>    1 file changed, 1 insertion(+), 1 deletion(-)
> >>>
> >>> diff --git a/blivet/partitioning.py b/blivet/partitioning.py
> >>> index 0135d05..25977a5 100644
> >>> --- a/blivet/partitioning.py
> >>> +++ b/blivet/partitioning.py
> >>> @@ -1733,7 +1733,7 @@ class ThinPoolChunk(VGChunk):
> >>>            self.vg = pool.vg   # only used for align, &c
> >>>            self.path = pool.path
> >>>            usable_extents = (pool.size / pool.vg.peSize)
> >>> -        # Skip VGChunk's constructor.
> >>> +        # pylint: disable=E1003
> >>>            super(VGChunk, self).__init__(usable_extents,
> >>>            requests=requests)
> >>>    
> >>>    def getDiskChunks(disk, partitions, free):
> >> I don't see a reason to get rid of the original comment about skipping
> >> VGChunk
> >> _______________________________________________
> >> anaconda-patches mailing list
> >> anaconda-patches at lists.fedorahosted.org
> >> https://lists.fedorahosted.org/mailman/listinfo/anaconda-patches
> >>
> > The subtext of the comment and the pylint pragma are the same: "Yeah, this
> > is intentional."
> > The text of the comment just explains what the code does, but the code does
> > that as well.
> > I feel that the pylint pragma makes the comment wholly redundant, so I
> > removed it.
> 
> It is only wholly redundant if you have the pylint error codes
> memorized. I don't think we should require that.
> 
> David
> 
> >
> > - mulhern
> >
> > _______________________________________________
> > anaconda-patches mailing list
> > anaconda-patches at lists.fedorahosted.org
> > https://lists.fedorahosted.org/mailman/listinfo/anaconda-patches
> 
> _______________________________________________
> anaconda-patches mailing list
> anaconda-patches at lists.fedorahosted.org
> https://lists.fedorahosted.org/mailman/listinfo/anaconda-patches
> 

It turns out that pylint allows you to use short string codes instead
of numeric ones and I plan to use those for all pragmas from now on.
This one would be

bad-super-call

which communicates a lot more than E1003.

- mulhern



More information about the anaconda-patches mailing list