Merge lp://qastaging/~justin-fathomdb/nova/justinsb-fix-pep8 into lp://qastaging/~hudson-openstack/nova/trunk

Proposed by justinsb
Status: Work in progress
Proposed branch: lp://qastaging/~justin-fathomdb/nova/justinsb-fix-pep8
Merge into: lp://qastaging/~hudson-openstack/nova/trunk
Diff against target: 13 lines (+1/-2)
1 file modified
nova/tests/api/openstack/test_zones.py (+1/-2)
To merge this branch: bzr merge lp://qastaging/~justin-fathomdb/nova/justinsb-fix-pep8
Reviewer Review Type Date Requested Status
Rick Harris (community) Disapprove
Jesse Andrews (community) Approve
Review via email: mp+50432@code.qastaging.launchpad.net

Description of the change

Fix a pep8 violation that kept messing up my pep8 runs...

To post a comment you must log in.
Revision history for this message
Jesse Andrews (anotherjesse) wrote :

Lgtm

review: Approve
Revision history for this message
Rick Harris (rconradharris) wrote :

Strangely, pep8 didn't complain for me when I ran it on the uncorrected file. I'm curious which rule was violated. Have any output here?

(As a sanity check, I purposefully inserted a pep8 violation, and it *did* complain in that instance)

review: Needs Information
Revision history for this message
justinsb (justin-fathomdb) wrote :

Rick: Sure... I definitely am all for getting to the bottom of this! It's annoying, but I can live with it for a while, so we should definitely figure out how the pep8 violation snuck in if that's what happened, or what's different about how I'm running pep8 vs the test suite and which way is right... Details below.

My pep8 version:
pep8 --version
0.5.0

Here's the violation error:
nova/tests/api/openstack/test_zones.py:60:36: E202 whitespace before ']'
                 password='qwerty')
                                   ^
    Avoid extraneous whitespace in the following situations:

    - Immediately inside parentheses, brackets or braces.

    - Immediately before a comma, semicolon, or colon.

    Okay: spam(ham[1], {eggs: 2})
    E201: spam( ham[1], {eggs: 2})
    E201: spam(ham[ 1], {eggs: 2})
    E201: spam(ham[1], { eggs: 2})
    E202: spam(ham[1], {eggs: 2} )
    E202: spam(ham[1 ], {eggs: 2})
    E202: spam(ham[1], {eggs: 2 })

    E203: if x == 4: print x, y; x, y = y , x
    E203: if x == 4: print x, y ; x, y = y, x
    E203: if x == 4 : print x, y; x, y = y, x

Revision history for this message
Rick Harris (rconradharris) wrote :

> pep8 --version
> 0.5.0

Ah, looks like you're running an older version of pep8. I'm assuming since you're the first to notice it, we're probably all running the newer version (> 0.6).

My version:

$ pep8 --version
0.6.1

Revision history for this message
Rick Harris (rconradharris) wrote :

Hmm, I just noticed that our `tools/pip-requires` file includes this line:

pep8==0.5.0

Wondering if we should bump that up to the 0.6 version now?

Revision history for this message
justinsb (justin-fathomdb) wrote :

It does indeed disappear with pep8 version == 0.6.1 (which is the version I just got from easy_install pep8). I was previously running the apt-get version on Maverick (0.5.0).

I'm guessing that the pep8 police decided that this should be decriminalized, so we can close this merge request?

Revision history for this message
Rick Harris (rconradharris) wrote :

> so we can close this merge request?

Yep, I think we should close this without merge.

I've reported the pip-requires issue here https://bugs.launchpad.net/nova/+bug/721867

Thanks for raising this, it'll be nice to get everyone standardized on the more recent version of pep8.

review: Disapprove
Revision history for this message
justinsb (justin-fathomdb) wrote :

Bug report looks like the right way to handle this. Moved to 'work in progress' as we'll lose the comments here if I delete it.

Unmerged revisions

702. By justinsb

Fix pep8 violation in test_zones.
I have no idea how this got through the unit tests!

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.