bare excepts

Robert Collins robertc at robertcollins.net
Tue Jan 3 23:53:43 GMT 2006


On Tue, 2006-01-03 at 08:52 -0600, John Arbash Meinel wrote:
> mlh wrote:
> > On Tue, Jan 03, 2006 at 04:17:06PM +1100, Robert Collins wrote:
> > 
> >>What do you guys think of a test for bare excepts? I just spent ~ 30
> >>minutes tracking down a bug that was hidden by:
> > 
> > 
> > Wouldn't pychecker and it's ilk get this sort of stuff?

Some things yes, but not all ;)

> >From what I've seen it seems like it should. I suppose one of our test
> cases could be to run pychecker if it is available. But I think whatever
> we do it needs to be in the test suite, since we are used to running
> that, and not trying to remember to run another command.

ack,

> Also, I was thinking about writing a test that checks for pep8
> conformance. If pychecker would do that already, it would be very nice.
> As much as I try to get my whitespace correct, I always seem to miss one
> or two, and having something automated check up after me is a lot more
> efficient than making Robert do it.

I'm fairly sure pep8 is checkable for by pychecker - I'd go down that
path (looking for a tweakable pychecker to match our practices) before
considering a custom state machine. Also, I'm more worried about
semantic issues - bare excepts, use of deprecated apis, use of apis from
the wrong layer - than code format. Code format is easily fixable as we
notice, semantic issues however can be more troublesome to fix.

Rob

-- 
GPG key available at: <http://www.robertcollins.net/keys.txt>.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060104/0b05087e/attachment.pgp 


More information about the bazaar mailing list