Make entry point strings readable

PEP8 E126 wants continued strings to line up vertically, totally destroying the
readability and visual indication of the beginning of a string in a list

* Ignore PEP8 E126 in order to indent the entry point strings in a readable manner.
* Sort the enrty point command strings by object then verb.
* Bring other ignores from run_tests.sh to tox.ini

Change-Id: I2593de7d6c058322101bc68636317cdba29fe664
This commit is contained in:
Dean Troyer 2013-03-21 12:21:55 -05:00
parent b175184f23
commit 73fb88e931
3 changed files with 130 additions and 110 deletions

View File

@ -118,7 +118,7 @@ function run_pep8 {
# other than what the PEP8 tool claims. It is deprecated in Python 3, so, # other than what the PEP8 tool claims. It is deprecated in Python 3, so,
# perhaps the mistake was thinking that the deprecation applied to Python 2 # perhaps the mistake was thinking that the deprecation applied to Python 2
# as well. # as well.
pep8_opts="--ignore=E202,W602 --repeat" pep8_opts="--ignore=E126,E202,W602 --repeat"
${wrapper} pep8 ${pep8_opts} ${srcfiles} ${wrapper} pep8 ${pep8_opts} ${srcfiles}
} }

202
setup.py
View File

@ -57,162 +57,182 @@ setuptools.setup(
'openstack.cli': [ 'openstack.cli': [
], ],
'openstack.identity.v2_0': [ 'openstack.identity.v2_0': [
'create_endpoint=' + 'create_endpoint='
'openstackclient.identity.v2_0.endpoint:CreateEndpoint', 'openstackclient.identity.v2_0.endpoint:CreateEndpoint',
'delete_endpoint=' + 'delete_endpoint='
'openstackclient.identity.v2_0.endpoint:DeleteEndpoint', 'openstackclient.identity.v2_0.endpoint:DeleteEndpoint',
'list_endpoint=' + 'list_endpoint='
'openstackclient.identity.v2_0.endpoint:ListEndpoint', 'openstackclient.identity.v2_0.endpoint:ListEndpoint',
'show_endpoint=' + 'show_endpoint='
'openstackclient.identity.v2_0.endpoint:ShowEndpoint', 'openstackclient.identity.v2_0.endpoint:ShowEndpoint',
'add_role=' +
'add_role='
'openstackclient.identity.v2_0.role:AddRole', 'openstackclient.identity.v2_0.role:AddRole',
'create_role=' + 'create_role='
'openstackclient.identity.v2_0.role:CreateRole', 'openstackclient.identity.v2_0.role:CreateRole',
'delete_role=' + 'delete_role='
'openstackclient.identity.v2_0.role:DeleteRole', 'openstackclient.identity.v2_0.role:DeleteRole',
'list_role=openstackclient.identity.v2_0.role:ListRole', 'list_role=openstackclient.identity.v2_0.role:ListRole',
'remove_role=' + 'remove_role='
'openstackclient.identity.v2_0.role:RemoveRole', 'openstackclient.identity.v2_0.role:RemoveRole',
'show_role=openstackclient.identity.v2_0.role:ShowRole', 'show_role=openstackclient.identity.v2_0.role:ShowRole',
'create_service=' +
'create_service='
'openstackclient.identity.v2_0.service:CreateService', 'openstackclient.identity.v2_0.service:CreateService',
'delete_service=' + 'delete_service='
'openstackclient.identity.v2_0.service:DeleteService', 'openstackclient.identity.v2_0.service:DeleteService',
'list_service=openstackclient.identity.v2_0.service:ListService', 'list_service=openstackclient.identity.v2_0.service:ListService',
'show_service=openstackclient.identity.v2_0.service:ShowService', 'show_service=openstackclient.identity.v2_0.service:ShowService',
'create_tenant=' +
'create_tenant='
'openstackclient.identity.v2_0.tenant:CreateTenant', 'openstackclient.identity.v2_0.tenant:CreateTenant',
'delete_tenant=' + 'delete_tenant='
'openstackclient.identity.v2_0.tenant:DeleteTenant', 'openstackclient.identity.v2_0.tenant:DeleteTenant',
'list_tenant=openstackclient.identity.v2_0.tenant:ListTenant', 'list_tenant=openstackclient.identity.v2_0.tenant:ListTenant',
'set_tenant=openstackclient.identity.v2_0.tenant:SetTenant', 'set_tenant=openstackclient.identity.v2_0.tenant:SetTenant',
'show_tenant=openstackclient.identity.v2_0.tenant:ShowTenant', 'show_tenant=openstackclient.identity.v2_0.tenant:ShowTenant',
'list_user-role=openstackclient.identity.v2_0.role:ListUserRole', 'list_user-role=openstackclient.identity.v2_0.role:ListUserRole',
'create_user=' +
'create_user='
'openstackclient.identity.v2_0.user:CreateUser', 'openstackclient.identity.v2_0.user:CreateUser',
'delete_user=' + 'delete_user='
'openstackclient.identity.v2_0.user:DeleteUser', 'openstackclient.identity.v2_0.user:DeleteUser',
'list_user=openstackclient.identity.v2_0.user:ListUser', 'list_user=openstackclient.identity.v2_0.user:ListUser',
'set_user=openstackclient.identity.v2_0.user:SetUser', 'set_user=openstackclient.identity.v2_0.user:SetUser',
'show_user=openstackclient.identity.v2_0.user:ShowUser', 'show_user=openstackclient.identity.v2_0.user:ShowUser',
], ],
'openstack.identity.v3': [ 'openstack.identity.v3': [
'create_group=openstackclient.identity.v3.group:CreateGroup', 'create_credential='
'delete_group=openstackclient.identity.v3.group:DeleteGroup',
'set_group=openstackclient.identity.v3.group:SetGroup',
'show_group=openstackclient.identity.v3.group:ShowGroup',
'list_group=openstackclient.identity.v3.group:ListGroup',
'create_project=' +
'openstackclient.identity.v3.project:CreateProject',
'delete_project=' +
'openstackclient.identity.v3.project:DeleteProject',
'set_project=openstackclient.identity.v3.project:SetProject',
'show_project=openstackclient.identity.v3.project:ShowProject',
'list_project=openstackclient.identity.v3.project:ListProject',
'create_user=' +
'openstackclient.identity.v3.user:CreateUser',
'delete_user=' +
'openstackclient.identity.v3.user:DeleteUser',
'list_user=openstackclient.identity.v3.user:ListUser',
'set_user=openstackclient.identity.v3.user:SetUser',
'show_user=openstackclient.identity.v3.user:ShowUser',
'create_credential=' +
'openstackclient.identity.v3.credential:CreateCredential', 'openstackclient.identity.v3.credential:CreateCredential',
'delete_credential=' + 'delete_credential='
'openstackclient.identity.v3.credential:DeleteCredential', 'openstackclient.identity.v3.credential:DeleteCredential',
'set_credential=' + 'list_credential='
'openstackclient.identity.v3.credential:SetCredential',
'show_credential=' +
'openstackclient.identity.v3.credential:ShowCredential',
'list_credential=' +
'openstackclient.identity.v3.credential:ListCredential', 'openstackclient.identity.v3.credential:ListCredential',
'set_credential='
'openstackclient.identity.v3.credential:SetCredential',
'show_credential='
'openstackclient.identity.v3.credential:ShowCredential',
'create_domain=openstackclient.identity.v3.domain:CreateDomain', 'create_domain=openstackclient.identity.v3.domain:CreateDomain',
'delete_domain=openstackclient.identity.v3.domain:DeleteDomain', 'delete_domain=openstackclient.identity.v3.domain:DeleteDomain',
'list_domain=openstackclient.identity.v3.domain:ListDomain',
'set_domain=openstackclient.identity.v3.domain:SetDomain', 'set_domain=openstackclient.identity.v3.domain:SetDomain',
'show_domain=openstackclient.identity.v3.domain:ShowDomain', 'show_domain=openstackclient.identity.v3.domain:ShowDomain',
'list_domain=openstackclient.identity.v3.domain:ListDomain',
'create_role=' + 'create_endpoint='
'openstackclient.identity.v3.role:CreateRole',
'delete_role=' +
'openstackclient.identity.v3.role:DeleteRole',
'list_role=openstackclient.identity.v3.role:ListRole',
'show_role=openstackclient.identity.v3.role:ShowRole',
'set_role=openstackclient.identity.v3.role:SetRole',
'add_role=openstackclient.identity.v3.role:AddRole',
'create_service=' +
'openstackclient.identity.v3.service:CreateService',
'delete_service=' +
'openstackclient.identity.v3.service:DeleteService',
'list_service=openstackclient.identity.v3.service:ListService',
'show_service=openstackclient.identity.v3.service:ShowService',
'set_service=openstackclient.identity.v3.service:SetService',
'create_endpoint=' +
'openstackclient.identity.v3.endpoint:CreateEndpoint', 'openstackclient.identity.v3.endpoint:CreateEndpoint',
'delete_endpoint=' + 'delete_endpoint='
'openstackclient.identity.v3.endpoint:DeleteEndpoint', 'openstackclient.identity.v3.endpoint:DeleteEndpoint',
'set_endpoint=openstackclient.identity.v3.endpoint:SetEndpoint', 'set_endpoint=openstackclient.identity.v3.endpoint:SetEndpoint',
'show_endpoint=openstackclient.identity.v3.endpoint:ShowEndpoint', 'show_endpoint=openstackclient.identity.v3.endpoint:ShowEndpoint',
'list_endpoint=openstackclient.identity.v3.endpoint:ListEndpoint', 'list_endpoint=openstackclient.identity.v3.endpoint:ListEndpoint',
'create_group=openstackclient.identity.v3.group:CreateGroup',
'delete_group=openstackclient.identity.v3.group:DeleteGroup',
'list_group=openstackclient.identity.v3.group:ListGroup',
'set_group=openstackclient.identity.v3.group:SetGroup',
'show_group=openstackclient.identity.v3.group:ShowGroup',
'create_project='
'openstackclient.identity.v3.project:CreateProject',
'delete_project='
'openstackclient.identity.v3.project:DeleteProject',
'list_project=openstackclient.identity.v3.project:ListProject',
'set_project=openstackclient.identity.v3.project:SetProject',
'show_project=openstackclient.identity.v3.project:ShowProject',
'add_role=openstackclient.identity.v3.role:AddRole',
'create_role='
'openstackclient.identity.v3.role:CreateRole',
'delete_role='
'openstackclient.identity.v3.role:DeleteRole',
'list_role=openstackclient.identity.v3.role:ListRole',
'show_role=openstackclient.identity.v3.role:ShowRole',
'set_role=openstackclient.identity.v3.role:SetRole',
'create_service='
'openstackclient.identity.v3.service:CreateService',
'delete_service='
'openstackclient.identity.v3.service:DeleteService',
'list_service=openstackclient.identity.v3.service:ListService',
'show_service=openstackclient.identity.v3.service:ShowService',
'set_service=openstackclient.identity.v3.service:SetService',
'create_user='
'openstackclient.identity.v3.user:CreateUser',
'delete_user='
'openstackclient.identity.v3.user:DeleteUser',
'list_user=openstackclient.identity.v3.user:ListUser',
'set_user=openstackclient.identity.v3.user:SetUser',
'show_user=openstackclient.identity.v3.user:ShowUser',
], ],
'openstack.image.v2': [ 'openstack.image.v2': [
'list_image=openstackclient.image.v2.image:ListImage', 'list_image=openstackclient.image.v2.image:ListImage',
'show_image=openstackclient.image.v2.image:ShowImage',
'save_image=openstackclient.image.v2.image:SaveImage', 'save_image=openstackclient.image.v2.image:SaveImage',
'show_image=openstackclient.image.v2.image:ShowImage',
], ],
'openstack.compute.v2': [ 'openstack.compute.v2': [
'create_agent=openstackclient.compute.v2.agent:CreateAgent', 'create_agent=openstackclient.compute.v2.agent:CreateAgent',
'create_flavor=openstackclient.compute.v2.flavor:CreateFlavor',
'create_server=openstackclient.compute.v2.server:CreateServer',
'delete_agent=openstackclient.compute.v2.agent:DeleteAgent', 'delete_agent=openstackclient.compute.v2.agent:DeleteAgent',
'delete_flavor=openstackclient.compute.v2.flavor:DeleteFlavor',
'delete_server=openstackclient.compute.v2.server:DeleteServer',
'list_agent=openstackclient.compute.v2.agent:ListAgent', 'list_agent=openstackclient.compute.v2.agent:ListAgent',
'list_flavor=openstackclient.compute.v2.flavor:ListFlavor', 'set_agent=openstackclient.compute.v2.agent:SetAgent',
'list_host=openstackclient.compute.v2.host:ListHost',
'list_hypervisor=' + 'list_compute-service='
'openstackclient.compute.v2.hypervisor:ListHypervisor',
'list_server=openstackclient.compute.v2.server:ListServer',
'list_compute-service=' +
'openstackclient.compute.v2.service:ListService', 'openstackclient.compute.v2.service:ListService',
'set_compute-service='
'openstackclient.compute.v2.service:SetService',
'create_flavor=openstackclient.compute.v2.flavor:CreateFlavor',
'delete_flavor=openstackclient.compute.v2.flavor:DeleteFlavor',
'list_flavor=openstackclient.compute.v2.flavor:ListFlavor',
'show_flavor=openstackclient.compute.v2.flavor:ShowFlavor',
'list_host=openstackclient.compute.v2.host:ListHost',
'show_host=openstackclient.compute.v2.host:ShowHost',
'list_hypervisor='
'openstackclient.compute.v2.hypervisor:ListHypervisor',
'show_hypervisor='
'openstackclient.compute.v2.hypervisor:ShowHypervisor',
'create_server=openstackclient.compute.v2.server:CreateServer',
'delete_server=openstackclient.compute.v2.server:DeleteServer',
'list_server=openstackclient.compute.v2.server:ListServer',
'pause_server=openstackclient.compute.v2.server:PauseServer', 'pause_server=openstackclient.compute.v2.server:PauseServer',
'reboot_server=openstackclient.compute.v2.server:RebootServer', 'reboot_server=openstackclient.compute.v2.server:RebootServer',
'rebuild_server=openstackclient.compute.v2.server:RebuildServer', 'rebuild_server=openstackclient.compute.v2.server:RebuildServer',
'resume_server=openstackclient.compute.v2.server:ResumeServer', 'resume_server=openstackclient.compute.v2.server:ResumeServer',
'set_agent=openstackclient.compute.v2.agent:SetAgent',
'set_compute-service=' +
'openstackclient.compute.v2.service:SetService',
'show_flavor=openstackclient.compute.v2.flavor:ShowFlavor',
'show_host=openstackclient.compute.v2.host:ShowHost',
'show_hypervisor=' +
'openstackclient.compute.v2.hypervisor:ShowHypervisor',
'show_server=openstackclient.compute.v2.server:ShowServer', 'show_server=openstackclient.compute.v2.server:ShowServer',
'suspend_server=openstackclient.compute.v2.server:SuspendServer', 'suspend_server=openstackclient.compute.v2.server:SuspendServer',
'unpause_server=openstackclient.compute.v2.server:UnpauseServer', 'unpause_server=openstackclient.compute.v2.server:UnpauseServer',
], ],
'openstack.volume.v1': [ 'openstack.volume.v1': [
'create_volume-type=' +
'openstackclient.volume.v1.type:CreateVolumeType',
'delete_volume-type=' +
'openstackclient.volume.v1.type:DeleteVolumeType',
'list_volume-type=openstackclient.volume.v1.type:ListVolumeType',
'set_volume-type=openstackclient.volume.v1.type:SetVolumeType',
'unset_volume-type=openstackclient.volume.v1.type:UnsetVolumeType',
'show_quota=openstackclient.volume.v1.quota:ShowQuota',
'list_quota=openstackclient.volume.v1.quota:ListQuota', 'list_quota=openstackclient.volume.v1.quota:ListQuota',
'set_quota=openstackclient.volume.v1.quota:SetQuota', 'set_quota=openstackclient.volume.v1.quota:SetQuota',
'show_quota=openstackclient.volume.v1.quota:ShowQuota',
'create_snapshot='
'openstackclient.volume.v1.snapshot:CreateSnapshot',
'delete_snapshot='
'openstackclient.volume.v1.snapshot:DeleteSnapshot',
'list_snapshot=openstackclient.volume.v1.snapshot:ListSnapshot',
'set_snapshot=openstackclient.volume.v1.snapshot:SetSnapshot',
'show_snapshot=openstackclient.volume.v1.snapshot:ShowSnapshot',
'create_volume=openstackclient.volume.v1.volume:CreateVolume', 'create_volume=openstackclient.volume.v1.volume:CreateVolume',
'delete_volume=openstackclient.volume.v1.volume:DeleteVolume', 'delete_volume=openstackclient.volume.v1.volume:DeleteVolume',
'list_volume=openstackclient.volume.v1.volume:ListVolume', 'list_volume=openstackclient.volume.v1.volume:ListVolume',
'set_volume=openstackclient.volume.v1.volume:SetVolume', 'set_volume=openstackclient.volume.v1.volume:SetVolume',
'show_volume=openstackclient.volume.v1.volume:ShowVolume', 'show_volume=openstackclient.volume.v1.volume:ShowVolume',
'create_snapshot=' +
'openstackclient.volume.v1.snapshot:CreateSnapshot', 'create_volume-type='
'delete_snapshot=' + 'openstackclient.volume.v1.type:CreateVolumeType',
'openstackclient.volume.v1.snapshot:DeleteSnapshot', 'delete_volume-type='
'list_snapshot=openstackclient.volume.v1.snapshot:ListSnapshot', 'openstackclient.volume.v1.type:DeleteVolumeType',
'set_snapshot=openstackclient.volume.v1.snapshot:SetSnapshot', 'list_volume-type=openstackclient.volume.v1.type:ListVolumeType',
'show_snapshot=openstackclient.volume.v1.snapshot:ShowSnapshot', 'set_volume-type=openstackclient.volume.v1.type:SetVolumeType',
'unset_volume-type=openstackclient.volume.v1.type:UnsetVolumeType',
] ]
} }
) )

View File

@ -12,7 +12,7 @@ commands = python setup.py testr --testr-args='{posargs}'
[testenv:pep8] [testenv:pep8]
deps = pep8==1.3.3 deps = pep8==1.3.3
commands = pep8 --repeat --show-source openstackclient setup.py commands = pep8 --ignore=E126,E202,W602 --repeat --show-source openstackclient setup.py
[testenv:venv] [testenv:venv]
commands = {posargs} commands = {posargs}