[openstack-dev] Hacking and PEP 257: Extra blank line at end of multi-line docstring

Joe Gordon joe.gordon0 at gmail.com
Wed Feb 26 16:40:08 UTC 2014


On Wed, Feb 26, 2014 at 6:39 AM, Ziad Sawalha
<ziad.sawalha at rackspace.com> wrote:
>
> On Feb 25, 2014, at 5:18 PM, Kevin L. Mitchell <kevin.mitchell at rackspace.com> wrote:
>
>> On Tue, 2014-02-25 at 00:56 +0000, Ziad Sawalha wrote:
>>> Seeking some clarification on the OpenStack hacking guidelines for
>>> multi-string docstrings.
>>>
>>>
>>> Q: In OpenStack projects, is a blank line before the triple closing
>>> quotes recommended (and therefore optional - this is what PEP-257
>>> seems to suggest), required, or explicitly rejected (which could be
>>> one way to interpret the hacking guidelines since they omit the blank
>>> line).
>>
>>
>> I lobbied to relax that restriction, because I happen to use Emacs, and
>> know that that limitation no longer exists with Emacs.
>
> Given the recommendation in PEP-257 is based solely on that, should
> we explicitly recommend not including that extra space?
>
> Should we add that rule to hacking?

If we do want to explicitly add that to hacking (I am not too keen on
doing that) it should come with a rule to enforce it.  But before
doing so I would be interested to see how many docstrings would need
to be changed to enforce this in different projects.

>
>>  I submitted the
>> change that eliminated that language from nova's HACKING at the time...
>
> Thanks, Kevin - based on that I'll resubmit my change without the blank line.

This is missing the point about manually enforcing style. If you pass
the 'pep8' job there is no need to change any style.

>
>
>> --
>> Kevin L. Mitchell <kevin.mitchell at rackspace.com>
>> Rackspace
>>
>>
>> _______________________________________________
>> OpenStack-dev mailing list
>> OpenStack-dev at lists.openstack.org
>> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>
>
> _______________________________________________
> OpenStack-dev mailing list
> OpenStack-dev at lists.openstack.org
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev



More information about the OpenStack-dev mailing list