[openstack-dev] [solum] pep8 - splitting expressions

Ed Leafe ed at leafe.com
Thu Sep 11 23:35:38 UTC 2014


On Sep 11, 2014, at 5:05 PM, Kevin L. Mitchell <kevin.mitchell at rackspace.com> wrote:

> I'd suggest trying:
> 
>        res = amodel.Assemblies(
>            uri=common.ASSEM_URI_STR % pecan.request.host_url,
>            name='Solum_CAMP_assemblies',
>            type='assemblies',
>            description=common.ASSEM_DESC_STR,
>            assembly_links=a_links,
>            parameter_definitions_uri=common.ASSEM_PARAM_STR %
>            pecan.request.host_url)
> 
> By moving the first argument to a line by itself, pep8 can be satisfied
> by indenting the following lines by 4 spaces.

When not using visual indentation, the standard is to indent two levels (i.e., 8 spaces), to distinguish it from typical blocks. But yes, I much prefer this than creating temporary names to accommodate the visual indentation style.


-- Ed Leafe





-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 842 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20140911/876d72cb/attachment.pgp>


More information about the OpenStack-dev mailing list