[Starlingx-discuss] pep 8 issue need to be fixed
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
On 2019-03-29 05:35:06 +0000 (+0000), Liu, ZhipengS wrote: [...]
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? [...]
Your tox.ini in that repository seems to include the flake8-bugbear plugin (with no version specifier) in the deps list for testenv:pep8. According to https://pypi.org/project/flake8-bugbear/#history they released a new version yesterday (19.3.0). Their changelog indicates they introduced new checks B009, B010 and B011 in that release. One tactic we take to avoid having these sorts of issues in OpenStack is for projects to pick what versions of static analysis tools they're going to use at the start of a release cycle and pin them like flake8-bugbear<19 for the duration of that cycle, then advance the version pin at the start of the next cycle to bring in the latest versions and fix whatever those have started warning about. This minimizes the chances of disruption at later points in the cycle when they may more significantly detract from things like release-focused work. -- Jeremy Stanley
Al has posted a review for a quick fix to resolve the stx-integ issues: https://review.openstack.org/#/c/648694/1 -----Original Message----- From: Jeremy Stanley [mailto:fungi@yuggoth.org] Sent: Friday, March 29, 2019 8:43 AM To: starlingx-discuss@lists.starlingx.io Subject: Re: [Starlingx-discuss] pep 8 issue need to be fixed On 2019-03-29 05:35:06 +0000 (+0000), Liu, ZhipengS wrote: [...]
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? [...]
Your tox.ini in that repository seems to include the flake8-bugbear plugin (with no version specifier) in the deps list for testenv:pep8. According to https://pypi.org/project/flake8-bugbear/#history they released a new version yesterday (19.3.0). Their changelog indicates they introduced new checks B009, B010 and B011 in that release. One tactic we take to avoid having these sorts of issues in OpenStack is for projects to pick what versions of static analysis tools they're going to use at the start of a release cycle and pin them like flake8-bugbear<19 for the duration of that cycle, then advance the version pin at the start of the next cycle to bring in the latest versions and fix whatever those have started warning about. This minimizes the chances of disruption at later points in the cycle when they may more significantly detract from things like release-focused work. -- Jeremy Stanley
Hi Penney, When I update my patch, it report new pep8 issue for the files without change. Errors are below. E302 expected 2 blank lines, found 1 E126 continuation line over-indented for hanging indent E127 continuation line over-indented for visual indent E128 continuation line under-indented for visual indent E305 expected 2 blank lines after class or function definition, found 1 What's your proposal for it, fix it or disable these errors? Thanks! Zhipeng -----Original Message----- From: Penney, Don [mailto:Don.Penney@windriver.com] Sent: 2019年3月29日 22:07 To: Jeremy Stanley <fungi@yuggoth.org>; starlingx-discuss@lists.starlingx.io Subject: Re: [Starlingx-discuss] pep 8 issue need to be fixed Al has posted a review for a quick fix to resolve the stx-integ issues: https://review.openstack.org/#/c/648694/1 -----Original Message----- From: Jeremy Stanley [mailto:fungi@yuggoth.org] Sent: Friday, March 29, 2019 8:43 AM To: starlingx-discuss@lists.starlingx.io Subject: Re: [Starlingx-discuss] pep 8 issue need to be fixed On 2019-03-29 05:35:06 +0000 (+0000), Liu, ZhipengS wrote: [...]
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? [...]
Your tox.ini in that repository seems to include the flake8-bugbear plugin (with no version specifier) in the deps list for testenv:pep8. According to https://pypi.org/project/flake8-bugbear/#history they released a new version yesterday (19.3.0). Their changelog indicates they introduced new checks B009, B010 and B011 in that release. One tactic we take to avoid having these sorts of issues in OpenStack is for projects to pick what versions of static analysis tools they're going to use at the start of a release cycle and pin them like flake8-bugbear<19 for the duration of that cycle, then advance the version pin at the start of the next cycle to bring in the latest versions and fix whatever those have started warning about. This minimizes the chances of disruption at later points in the cycle when they may more significantly detract from things like release-focused work. -- Jeremy Stanley _______________________________________________ Starlingx-discuss mailing list Starlingx-discuss@lists.starlingx.io http://lists.starlingx.io/cgi-bin/mailman/listinfo/starlingx-discuss
My proposal would be to fix them. These pep8 violations are for the files you are adding, rather than files that are outside your review. Al -----Original Message----- From: Liu, ZhipengS [mailto:zhipengs.liu@intel.com] Sent: Tuesday, April 09, 2019 9:43 PM To: Penney, Don; Jeremy Stanley; starlingx-discuss@lists.starlingx.io Subject: Re: [Starlingx-discuss] pep 8 issue need to be fixed Hi Penney, When I update my patch, it report new pep8 issue for the files without change. Errors are below. E302 expected 2 blank lines, found 1 E126 continuation line over-indented for hanging indent E127 continuation line over-indented for visual indent E128 continuation line under-indented for visual indent E305 expected 2 blank lines after class or function definition, found 1 What's your proposal for it, fix it or disable these errors? Thanks! Zhipeng -----Original Message----- From: Penney, Don [mailto:Don.Penney@windriver.com] Sent: 2019年3月29日 22:07 To: Jeremy Stanley <fungi@yuggoth.org>; starlingx-discuss@lists.starlingx.io Subject: Re: [Starlingx-discuss] pep 8 issue need to be fixed Al has posted a review for a quick fix to resolve the stx-integ issues: https://review.openstack.org/#/c/648694/1 -----Original Message----- From: Jeremy Stanley [mailto:fungi@yuggoth.org] Sent: Friday, March 29, 2019 8:43 AM To: starlingx-discuss@lists.starlingx.io Subject: Re: [Starlingx-discuss] pep 8 issue need to be fixed On 2019-03-29 05:35:06 +0000 (+0000), Liu, ZhipengS wrote: [...]
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? [...]
Your tox.ini in that repository seems to include the flake8-bugbear plugin (with no version specifier) in the deps list for testenv:pep8. According to https://pypi.org/project/flake8-bugbear/#history they released a new version yesterday (19.3.0). Their changelog indicates they introduced new checks B009, B010 and B011 in that release. One tactic we take to avoid having these sorts of issues in OpenStack is for projects to pick what versions of static analysis tools they're going to use at the start of a release cycle and pin them like flake8-bugbear<19 for the duration of that cycle, then advance the version pin at the start of the next cycle to bring in the latest versions and fix whatever those have started warning about. This minimizes the chances of disruption at later points in the cycle when they may more significantly detract from things like release-focused work. -- Jeremy Stanley _______________________________________________ Starlingx-discuss mailing list Starlingx-discuss@lists.starlingx.io http://lists.starlingx.io/cgi-bin/mailman/listinfo/starlingx-discuss _______________________________________________ Starlingx-discuss mailing list Starlingx-discuss@lists.starlingx.io http://lists.starlingx.io/cgi-bin/mailman/listinfo/starlingx-discuss
participants (4)
-
Bailey, Henry Albert (Al)
-
Jeremy Stanley
-
Liu, ZhipengS
-
Penney, Don