[blivet:master 0/5] Using property and abc.abstractproperty

Anne Mulhern amulhern at redhat.com
Tue Apr 1 20:46:07 UTC 2014





----- Original Message -----
> From: "David Shea" <dshea at redhat.com>
> To: anaconda-patches at lists.fedorahosted.org
> Sent: Tuesday, April 1, 2014 2:59:45 PM
> Subject: Re: [blivet:master 0/5] Using property and abc.abstractproperty
> 
> On 04/01/2014 01:26 PM, mulhern wrote:
> > These patches are just about using property and abc.abstractproperty with
> > a little more facility. They mostly just correct the verbosity I was prone
> > to when properties were still a bit of a novelty to me. The main motivation
> > is that they are now slightly bad usage examples, so I don't want to be
> > referring to them when they're in this state. All that patch reviewing
> > jogged
> > my memory.
> >
> > Make name an abstract property...should be completely invisible to client
> > code.
> > Make reads property... make things terser, that's all.
> > Change _labelstrRegex...makes things terser and changes the name which is
> > only used when calling testing code, anyway.
> > Change defaultLabel...ditto.
> > Change labelApp...the only one of any significance. Touches fs.py but only
> > to
> > change a name.
> >
> > mulhern (5):
> >    Make name an abstract property and omit _name
> >    Make reads property a bit more succinct.
> >    Change _labelstrRegex to a more concisely defined abstract property.
> >    Change defaultLabel to a more concisely defined abstract property.
> >    Change labelApp to a more concisely defined abstract property
> >
> >   blivet/formats/fs.py                | 18 +++----
> >   blivet/formats/fslabel.py           | 96
> >   +++++++++++++------------------------
> >   blivet/formats/fslabeling.py        | 88
> >   ++++++++--------------------------
> >   tests/formats_test/fslabeling.py    |  4 +-
> >   tests/formats_test/labeling_test.py |  6 +--
> >   5 files changed, 65 insertions(+), 147 deletions(-)
> >
> 
> My comment about not attaching a value to the abstract properties
> applies to the other patches as well. The abc part will take care of
> raising an exception. Other than that they look fine.
> _______________________________________________
> anaconda-patches mailing list
> anaconda-patches at lists.fedorahosted.org
> https://lists.fedorahosted.org/mailman/listinfo/anaconda-patches
> 

Good point, fixed in working copy.

- mulhern


More information about the anaconda-patches mailing list