charm pep8 lint checks fail

Bug #1836101 reported by Ryan Beisner
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Cinder Pure Storage Charm
Fix Released
Undecided
Narinder Gupta

Bug Description

At master from the original author, py3 lint/pep8 tests are failing:

pep8 installed: attrs==19.1.0,certifi==2019.6.16,chardet==3.0.4,charmhelpers==0.19.15,charms.openstack==0.0.1.dev1,charms.reactive==1.2.1,cliff==2.15.0,cmd2==0.9.14,colorama==0.4.1,coverage==4.5.3,extras==1.0.0,fixtures==3.0.0,flake8==2.4.1,future==0.17.1,idna==2.8,Jinja2==2.10.1,linecache2==1.0.0,MarkupSafe==1.1.1,mccabe==0.3.1,mock==3.0.5,netaddr==0.7.19,nose==1.3.7,pbr==5.4.0,pep8==1.7.1,pkg-resources==0.0.0,prettytable==0.7.2,pyaml==19.4.1,pyflakes==0.8.1,pyparsing==2.4.0,pyperclip==1.7.0,python-mimeparse==1.6.0,python-subunit==1.3.0,PyYAML==5.1.1,requests==2.22.0,six==1.12.0,stestr==2.3.1,stevedore==1.30.1,Tempita==0.5.2,testtools==2.3.0,traceback2==1.4.0,unittest2==1.1.0,urllib3==1.25.3,voluptuous==0.11.5,wcwidth==0.1.7
pep8 run-test-pre: PYTHONHASHSEED='0'
pep8 runtests: commands[0] | flake8 src unit_tests
/home/beisner/git/charm-cinder-purestorage/.tox/pep8/lib/python3.7/site-packages/pep8.py:110: FutureWarning: Possible nested set at position 1
  EXTRANEOUS_WHITESPACE_REGEX = re.compile(r'[[({] | []}),;:]')
/home/beisner/git/charm-cinder-purestorage/.tox/pep8/lib/python3.7/site-packages/flake8/engine.py:33: PkgResourcesDeprecationWarning: Parameters to load are deprecated. Call .resolve and .require separately.
  checker = entry.load(require=False)
src/reactive/cinder_purestorage_handlers.py:29:1: E302 expected 2 blank lines, found 1
src/reactive/cinder_purestorage_handlers.py:31:61: F811 redefinition of unused 'charm' from line 20
src/lib/charm/openstack/cinder_purestorage.py:2:47: E261 at least two spaces before inline comment
src/lib/charm/openstack/cinder_purestorage.py:2:54: W291 trailing whitespace
src/lib/charm/openstack/cinder_purestorage.py:6:1: E302 expected 2 blank lines, found 1
src/lib/charm/openstack/cinder_purestorage.py:16:13: E126 continuation line over-indented for hanging indent
src/lib/charm/openstack/cinder_purestorage.py:16:24: F821 undefined name 'self'
src/lib/charm/openstack/cinder_purestorage.py:17:32: F821 undefined name 'self'
src/lib/charm/openstack/cinder_purestorage.py:24:61: F821 undefined name 'service_name'
src/lib/charm/openstack/cinder_purestorage.py:32:1: E302 expected 2 blank lines, found 1
unit_tests/test_lib_charm_openstack_cinder_purestorage.py:47:46: E261 at least two spaces before inline comment
src/tests/tests_cinder_purestorage.py:26:1: E302 expected 2 blank lines, found 1
src/tests/tests_cinder_purestorage.py:44:80: E501 line too long (80 > 79 characters)
src/tests/tests_cinder_purestorage.py:59:10: E111 indentation is not a multiple of four
src/tests/tests_cinder_purestorage.py:60:10: E111 indentation is not a multiple of four
src/tests/tests_cinder_purestorage.py:63:10: E111 indentation is not a multiple of four
src/tests/tests_cinder_purestorage.py:67:10: E111 indentation is not a multiple of four
src/tests/tests_cinder_purestorage.py:68:10: E111 indentation is not a multiple of four
src/tests/tests_cinder_purestorage.py:71:10: E111 indentation is not a multiple of four
src/tests/tests_cinder_purestorage.py:72:1: W391 blank line at end of file
ERROR: InvocationError for command '/home/beisner/git/charm-cinder-purestorage/.tox/pep8/bin/flake8 src unit_tests' (exited with code 1)
___________________________________ summary ____________________________________
ERROR: pep8: commands failed

Tags: uosci
Revision history for this message
Ryan Beisner (1chb1n) wrote :
Ryan Beisner (1chb1n)
description: updated
Revision history for this message
Ryan Beisner (1chb1n) wrote :

Take note: removig "noqa" markers, which may surface more serious issues, but please do not re-ntroduce those lint skip statements.

Revision history for this message
Ryan Beisner (1chb1n) wrote :

We've taken this to a point where the obvious pep8 violations are resolved. The remaining errors are likely design issues which will need to be addressed after discussion with the author/maintainer. The following remaining lint errors are echoed in the unit tests and in deploy-time hook errors.

beisner@rby:~/git/charm-cinder-purestorage$ tox -e pep8
pep8 installed: attrs==19.1.0,certifi==2019.6.16,chardet==3.0.4,charmhelpers==0.19.15,charms.openstack==0.0.1.dev1,charms.reactive==1.2.1,cliff==2.15.0,cmd2==0.9.14,colorama==0.4.1,coverage==4.5.3,extras==1.0.0,fixtures==3.0.0,flake8==2.4.1,future==0.17.1,idna==2.8,Jinja2==2.10.1,linecache2==1.0.0,MarkupSafe==1.1.1,mccabe==0.3.1,mock==3.0.5,netaddr==0.7.19,nose==1.3.7,pbr==5.4.0,pep8==1.7.1,pkg-resources==0.0.0,prettytable==0.7.2,pyaml==19.4.1,pyflakes==0.8.1,pyparsing==2.4.0,pyperclip==1.7.0,python-mimeparse==1.6.0,python-subunit==1.3.0,PyYAML==5.1.1,requests==2.22.0,six==1.12.0,stestr==2.3.1,stevedore==1.30.1,Tempita==0.5.2,testtools==2.3.0,traceback2==1.4.0,unittest2==1.1.0,urllib3==1.25.3,voluptuous==0.11.5,wcwidth==0.1.7
pep8 run-test-pre: PYTHONHASHSEED='0'
pep8 runtests: commands[0] | flake8 src unit_tests
/home/beisner/git/charm-cinder-purestorage/.tox/pep8/lib/python3.7/site-packages/pep8.py:110: FutureWarning: Possible nested set at position 1
  EXTRANEOUS_WHITESPACE_REGEX = re.compile(r'[[({] | []}),;:]')
/home/beisner/git/charm-cinder-purestorage/.tox/pep8/lib/python3.7/site-packages/flake8/engine.py:33: PkgResourcesDeprecationWarning: Parameters to load are deprecated. Call .resolve and .require separately.
  checker = entry.load(require=False)
src/reactive/cinder_purestorage_handlers.py:20:1: F401 'charm' imported but unused
src/reactive/cinder_purestorage_handlers.py:32:61: F811 redefinition of unused 'charm' from line 20
src/lib/charm/openstack/cinder_purestorage.py:2:1: F401 'ch_hookenv' imported but unused
src/lib/charm/openstack/cinder_purestorage.py:17:20: F821 undefined name 'self'
src/lib/charm/openstack/cinder_purestorage.py:18:28: F821 undefined name 'self'
src/lib/charm/openstack/cinder_purestorage.py:26:61: F821 undefined name 'service_name'
unit_tests/test_lib_charm_openstack_cinder_purestorage.py:47:9: F841 local variable 'config' is assigned to but never used
ERROR: InvocationError for command '/home/beisner/git/charm-cinder-purestorage/.tox/pep8/bin/flake8 src unit_tests' (exited with code 1)
________________________________________________________________________________________ summary _________________________________________________________________________________________
ERROR: pep8: commands failed

Changed in charm-cinder-pure-storage:
status: New → In Progress
assignee: nobody → Narinder Gupta (narindergupta)
Ryan Beisner (1chb1n)
Changed in charm-cinder-pure-storage:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.