hacking.py breaks use of """ in non-docstrings

Bug #1100912 reported by Monty Taylor
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Medium
Joe Gordon

Bug Description

Examples here:

http://logs.openstack.org/18705/16/check/gate-nova-pep8/17572/console.html.gz

./nova/virt/baremetal/virtual_power_driver_settings.py:40:25: NOVA N402: one line docstring needs a period
18:10:41 self.list_cmd = """list vms|awk -F'"' '{print $2}'"""
18:10:41 ^

N402 is catching what it thinks is a docstring without a trailing period - but it's a valid use of the """ quote, not a single line docstring.

Changed in nova:
status: New → Confirmed
importance: Undecided → Medium
Joe Gordon (jogo)
Changed in nova:
assignee: nobody → Joe Gordon (jogo)
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

Fix proposed to branch: master
Review: https://review.openstack.org/23040

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/23040
Committed: http://github.com/openstack/nova/commit/c8e8084a1ff2f3d904c43b212d255b11639c0708
Submitter: Jenkins
Branch: master

commit c8e8084a1ff2f3d904c43b212d255b11639c0708
Author: Joe Gordon <email address hidden>
Date: Tue Feb 26 14:46:23 2013 -0800

    Improve hackings docstring detection

    Previously: def foo():\n a = '''This is not a docstring'''
    would be counted as a docstring even though it isn't.

    Fix this and add docstring tests.

    Fix bug 1100912

    Change-Id: Id4d4aa382713eea340720e166e418262ba68eaaf

Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
milestone: none → grizzly-rc1
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: grizzly-rc1 → 2013.1
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.