docstrings do not conform to the format in HACKING

Bug #1273096 reported by Liusheng
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ceilometer
Invalid
Undecided
Unassigned
Cinder
Invalid
Wishlist
Verónica Musso

Bug Description

I have noticed many docstrings in source files do not confirm to the format in HACKING:

http://docs.openstack.org/developer/hacking/#docstrings

For example, the definition of class cinder.api.v2.router.APIRouter:
 class APIRouter(cinder.api.openstack.APIRouter):
    """Routes requests on the API to the appropriate controller and method."""
    ExtensionManager = extensions.ExtensionManager

An extra line should be placed after the docstring.

Not coincidentally, in other projects of openstack, there are many docstrings are lack of standardization.
such as:
def _sanitize_query(query, db_func, on_behalf_of=None):
    '''Check the query to see if:
    1) the request is coming from admin - then allow full visibility
    2) non-admin - make sure that the query includes the requester's
    project.
    '''
    q = copy.copy(query)

in /ceilometer\api\controllers\v2.py:298

I am not sure these should be standardized.

Is this a bug?

Revision history for this message
Avishay Traeger (avishay-il) wrote :

Yes, according to HACKING an extra line should be added after the docstring for classes.

Changed in cinder:
importance: Undecided → Low
tags: added: low-hanging-fruit
Changed in cinder:
assignee: nobody → Verónica Musso (veronica-a-musso)
Liusheng (liusheng)
Changed in ceilometer:
assignee: nobody → Liusheng (liusheng)
Revision history for this message
John Griffith (john-griffith) wrote :

I have no problem if someone wants to work on fixing all of these up and turning on additional hacking rules. But as it stands today I wouldn't consider these triaged bugs.

Changed in cinder:
importance: Low → Wishlist
status: New → Invalid
Liusheng (liusheng)
Changed in ceilometer:
assignee: Liusheng (liusheng) → nobody
status: New → Invalid
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (master)

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

Changed in cinder:
status: Invalid → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

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

Changed in cinder:
assignee: Verónica Musso (veronica-a-musso) → Esperanza Romero (esperanza-romero)
Changed in cinder:
assignee: Esperanza Romero (esperanza-romero) → Verónica Musso (veronica-a-musso)
Changed in cinder:
status: In Progress → Invalid
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.