[Starlingx-discuss] pep 8 issue need to be fixed

Liu, ZhipengS zhipengs.liu at intel.com
Fri Mar 29 05:35:06 UTC 2019


Hi all,

When I update my patch for stx-integ, it report below errors, which causes
"Verified -1 Zuul"
Not sure why we have this issue now.
It is a common issue that I also saw in other patches submitted recently.
Do we need a new ticket to fix this pep8 issue or just disable B009 and B010? Any comment?

pep8 run-test: commands[0] | flake8
setting PATH=/home/zuul/src/git.openstack.org/openstack/stx-integ/.tox/pep8/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
[4871] /home/zuul/src/git.openstack.org/openstack/stx-integ$ /home/zuul/src/git.openstack.org/openstack/stx-integ/.tox/pep8/bin/flake8
./tools/storage-topology/storage-topology/storage_topology/exec/storage_topology.py:339:50: B009 Do not call getattr with a constant attribute value, it is not any safer than normal property access.
./tools/storage-topology/storage-topology/storage_topology/exec/storage_topology.py:340:50: B009 Do not call getattr with a constant attribute value, it is not any safer than normal property access.
./tools/storage-topology/storage-topology/storage_topology/exec/storage_topology.py:345:50: B009 Do not call getattr with a constant attribute value, it is not any safer than normal property access.
./tools/vm-topology/vm-topology/vm_topology/exec/vm_topology.py:400:13: B010 Do not call setattr with a constant attribute value, it is not any safer than normal property access.
./tools/vm-topology/vm-topology/vm_topology/exec/vm_topology.py:401:34: B009 Do not call getattr with a constant attribute value, it is not any safer than normal property access.
./tools/vm-topology/vm-topology/vm_topology/exec/vm_topology.py:403:13: B010 Do not call setattr with a constant attribute value, it is not any safer than normal property access.
./tools/vm-topology/vm-topology/vm_topology/exec/vm_topology.py:405:13: B009 Do not call getattr with a constant attribute value, it is not any safer than normal property access.
./tools/vm-topology/vm-topology/vm_topology/exec/vm_topology.py:407:13: B010 Do not call setattr with a constant attribute value, it is not any safer than normal property access.
ERROR: InvocationError for command /home/zuul/src/git.openstack.org/openstack/stx-integ/.tox/pep8/bin/flake8 (exited with code 1)

Thanks!
zhipeng

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.starlingx.io/pipermail/starlingx-discuss/attachments/20190329/28776eb7/attachment-0001.html>


More information about the Starlingx-discuss mailing list