Re: [openstack-dev] H302 considered harmful

2015-02-27 Thread Felipe Reyes
On Wed, 25 Feb 2015 15:47:46 -0500 Doug Hellmann d...@doughellmann.com wrote: I think the rule originally came from the way mock works. If you import a thing in your module and then a test tries to mock where it came from, your module still uses the version it imported because the name lookup

Re: [openstack-dev] H302 considered harmful

2015-02-27 Thread Clay Gerrard
So, Swift doesn't enforce H302 - and our imports are sorta messy frankly - but it doesn't really bother me, and I do rather enjoy the terseness of not having to spell out the module name. It's not really a chore to maintain, if you don't know where a name came from split the window (or drop a

Re: [openstack-dev] H302 considered harmful

2015-02-26 Thread Simon Pasquier
On Wed, Feb 25, 2015 at 9:47 PM, Doug Hellmann d...@doughellmann.com wrote: On Wed, Feb 25, 2015, at 02:59 PM, Robert Collins wrote: On 26 February 2015 at 08:54, melanie witt melwi...@gmail.com wrote: On Feb 25, 2015, at 10:51, Duncan Thomas duncan.tho...@gmail.com wrote: Is there

Re: [openstack-dev] H302 considered harmful

2015-02-25 Thread Robert Collins
On 26 February 2015 at 08:54, melanie witt melwi...@gmail.com wrote: On Feb 25, 2015, at 10:51, Duncan Thomas duncan.tho...@gmail.com wrote: Is there anybody who'd like to step forward in defence of this rule and explain why it is an improvement? I don't discount for a moment the

Re: [openstack-dev] H302 considered harmful

2015-02-25 Thread John Griffith
On Wed, Feb 25, 2015 at 12:59 PM, Robert Collins robe...@robertcollins.net wrote: On 26 February 2015 at 08:54, melanie witt melwi...@gmail.com wrote: On Feb 25, 2015, at 10:51, Duncan Thomas duncan.tho...@gmail.com wrote: Is there anybody who'd like to step forward in defence of this

Re: [openstack-dev] H302 considered harmful

2015-02-25 Thread Joe Gordon
On Wed, Feb 25, 2015 at 10:51 AM, Duncan Thomas duncan.tho...@gmail.com wrote: Hi So a review [1] was recently submitted to cinder to fix up all of the H302 violations, and turn on the automated check for them. This is certainly a reasonable suggestion given the number of manual reviews that

Re: [openstack-dev] H302 considered harmful

2015-02-25 Thread Duncan Thomas
Thanks for that, Joe. I'd say the cons miss 'It looks ugly in places'. On 25 February 2015 at 20:54, Joe Gordon joe.gord...@gmail.com wrote: On Wed, Feb 25, 2015 at 10:51 AM, Duncan Thomas duncan.tho...@gmail.com wrote: Hi So a review [1] was recently submitted to cinder to fix up all of

Re: [openstack-dev] H302 considered harmful

2015-02-25 Thread melanie witt
On Feb 25, 2015, at 10:51, Duncan Thomas duncan.tho...@gmail.com wrote: Is there anybody who'd like to step forward in defence of this rule and explain why it is an improvement? I don't discount for a moment the possibility I'm missing something, and welcome the education in that case A

Re: [openstack-dev] H302 considered harmful

2015-02-25 Thread Clint Byrum
Excerpts from Duncan Thomas's message of 2015-02-25 10:51:00 -0800: Hi So a review [1] was recently submitted to cinder to fix up all of the H302 violations, and turn on the automated check for them. This is certainly a reasonable suggestion given the number of manual reviews that -1 for

Re: [openstack-dev] H302 considered harmful

2015-02-25 Thread Doug Hellmann
On Wed, Feb 25, 2015, at 02:59 PM, Robert Collins wrote: On 26 February 2015 at 08:54, melanie witt melwi...@gmail.com wrote: On Feb 25, 2015, at 10:51, Duncan Thomas duncan.tho...@gmail.com wrote: Is there anybody who'd like to step forward in defence of this rule and explain why it

Re: [openstack-dev] H302 considered harmful

2015-02-25 Thread Duncan Thomas
Clint This rule is not currently enabled in Cinder. This review fixes up all cases and enables it, which is absolutely 100% the right thing to do if we decide to implement this rule. The purpose of this thread is to understand the value of the rule. We should either enforce it, or else

Re: [openstack-dev] H302 considered harmful

2015-02-25 Thread Min Pae
The “making things more explicit” argument carried to its logical conclusion would require that no “import … as …” ever be used either, and we would have to use the full namespace/path for each module or function being used. With allowing “import … as …” and the practice of extending and monkey

Re: [openstack-dev] H302 considered harmful

2015-02-25 Thread Clint Byrum
Excerpts from Duncan Thomas's message of 2015-02-25 12:51:35 -0800: Clint This rule is not currently enabled in Cinder. This review fixes up all cases and enables it, which is absolutely 100% the right thing to do if we decide to implement this rule. The purpose of this thread is to