stx-config tox flake8, pep8 checks only files with .py extension

Bug #1791350 reported by Daniel Badea
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
StarlingX
Fix Released
Medium
Daniel Badea

Bug Description

Brief Description
-----------------
sysinv/cmd/manage-partitions is failing flake8, pep8 when checked explicitly:

  tox -e pep8 -- sysinv/cmd/manage-partitions

Severity
--------
Minor

Steps to Reproduce
------------------
In stx-config/sysinv/sysinv/sysinv run:

  tox -e pep8 -- sysinv/cmd/manage-partitions

Expected Behavior
------------------
No errors reported

Actual Behavior
----------------
flake8 reports:

  sysinv/cmd/manage-partitions:201:18: E231 missing whitespace after ','
  sysinv/cmd/manage-partitions:828:67: E711 comparison to None should be 'if cond is not None:'

Reproducibility
---------------
100%

System Configuration
--------------------
Dev. environment, not a runtime issue.

Branch/Pull Time/Commit
-----------------------
Found on starlingx/master commit f19dd0498fb7e5af740837b1e2d93e618e53525b

Timestamp/Logs
--------------

    $ tox -e pep8 -- sysinv/cmd/manage-partitions
    GLOB sdist-make: /localdisk/designer/wrsroot/starlingx-0/cgcs-root/stx/stx-config/sysinv/sysinv/sysinv/setup.py
    pep8 inst-nodeps: /tmp/wrsroot_sysinvtox/dist/sysinv-2018.8.1.dev93.zip
    pep8 installed: alembic==0.9.3,amqp==2.2.1,amqplib==1.0.2,anyjson==0.3.3,appdirs==1.4.3,asn1crypto==0.22.0,Babel==2.3.4,backports.ssl-match-hostname==3.5.0.1,bcrypt==3.1.3,beautifulsoup4==4.6.0,blivet==0.61.15.69,certifi==2017.4.17,cffi==1.10.0,chardet==3.0.4,Cheetah==2.4.4,cliff==2.8.2,cmd2==0.7.5,configparser==3.5.0,coverage==3.6b3,cryptography==2.0.2,debtcollector==1.17.1,decorator==4.1.2,distro==1.2.0,enum-compat==0.0.2,enum34==1.1.6,eventlet==0.20.0,extras==0.0.3,fasteners==0.14.1,fixtures==0.3.14,flake8==3.5.0,fros==1.0,funcsigs==1.0.2,functools32==3.2.3.post2,git-review==1.24,greenlet==0.4.12,httplib2==0.10.3,idna==2.5,iniparse==0.4,ipaddress==1.0.18,IPy==0.75,iso8601==0.1.11,jsonpatch==1.16,jsonpointer==1.10,jsonschema==2.6.0,junitxml==0.7,keystoneauth1==3.1.0,keystonemiddleware==4.17.0,kitchen==1.1.1,kombu==4.1.0,kubernetes==2.0.0,langtable==0.0.31,logutils==0.3.5,lxml==3.8.0,Mako==1.0.7,Markdown==2.6.11,MarkupSafe==1.0,mccabe==0.6.1,monotonic==1.3,msgpack-python==0.4.8,netaddr==0.7.19,netifaces==0.10.6,ntplib==0.3.2,numpy==1.13.1,oauth2client==4.1.2,os-client-config==1.28.0,osc-lib==1.7.0,oslo.concurrency==3.21.1,oslo.config==4.11.1,oslo.context==2.17.1,oslo.db==4.25.1,oslo.i18n==3.17.1,oslo.log==3.30.2,oslo.serialization==2.20.2,oslo.service==1.25.1,oslo.utils==3.28.3,paramiko==2.2.1,passlib==1.7.1,Paste==2.0.3,PasteDeploy==1.5.2,pbr==3.1.1,pecan==1.2.1,pep8==1.4.6,pluggy==0.7.1,plumbum==1.6.7,positional==1.1.2,prettytable==0.7.2,psutil==5.2.2,py==1.5.4,pyasn1==0.3.1,pyasn1-modules==0.0.10,pycadf==2.6.0,pycodestyle==2.3.1,pycparser==2.18,pycrypto==2.6.1,pycurl==7.19.0,pyflakes==1.6.0,pyghmi==1.0.22,pygobject==3.22.0,pygpgme==0.3,pyinotify==0.9.6,pykickstart==1.99.66.18,pyliblzma==0.5.3,PyNaCl==1.1.2,pyOpenSSL==17.2.0,pyparsing==2.2.0,pyparted==3.9,pyperclip==1.5.27,pyroute2==0.4.13,python-cinderclient==3.1.0,python-dateutil==2.6.1,python-editor==1.0.3,python-glanceclient==2.8.0,python-keystoneclient==3.13.0,python-magnumclient==2.7.0,python-meh==0.25.2,python-mimeparse==1.6.0,python-neutronclient==6.5.0,python-nss==0.16.0,python-subunit==0.0.21,pytz==2017.2,pyudev==0.15,pyxattr==0.5.1,PyYAML==3.12,repoze.lru==0.6,requests==2.18.2,requestsexceptions==1.3.0,rfc3986==1.1.0,Routes==2.4.1,rpm==0.0.2,rpyc==4.0.2,rsa==3.4.2,simplegeneric==0.8.1,simplejson==3.11.1,singledispatch==3.4.0.3,six==1.10.0,slip==0.4.0,slip.dbus==0.4.0,SQLAlchemy==1.1.12,sqlalchemy-migrate==0.11.0,sqlparse==0.2.3,stevedore==1.25.1,sysinv==2018.8.1.dev93,Tempita==0.5.2,testrepository==0.0.18,testtools==1.1.0,tox==3.2.1,unicodecsv==0.14.1,urlgrabber==3.10,urllib3==1.22,vine==1.1.4,virtualenv==16.0.0,waitress==1.0.2,warlock==1.2.0,WebOb==1.7.3,websocket-client==0.44.0,websockify==0.8.0,WebTest==2.0.27,wrapt==1.10.10,WSME==0.9.2,yum-metadata-parser==1.1.4
    pep8 runtests: PYTHONHASHSEED='0'
    pep8 runtests: commands[0] | flake8 sysinv/cmd/manage-partitions
    sysinv/cmd/manage-partitions:201:18: E231 missing whitespace after ','
    sysinv/cmd/manage-partitions:828:67: E711 comparison to None should be 'if cond is not None:'
    ERROR: InvocationError for command '/tmp/wrsroot_sysinvtox/pep8/bin/flake8 sysinv/cmd/manage-partitions' (exited with code 1)
    ______________________________________________________________________________________________________________ summary ______________________________________________________________________________________________________________
    ERROR: pep8: commands failed

    $ date
    Fri Sep 7 18:12:08 UTC 2018

Changed in starlingx:
assignee: nobody → Daniel Badea (daniel.badea)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to stx-config (master)

Fix proposed to branch: master
Review: https://review.openstack.org/600840

Changed in starlingx:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Fix proposed to branch: master
Review: https://review.openstack.org/600842

Ghada Khalil (gkhalil)
Changed in starlingx:
importance: Undecided → Medium
Revision history for this message
Ghada Khalil (gkhalil) wrote :

Targeting stx.2018.10 as this is part of enabling more zuul checks prior to submissions

tags: added: stx.2018.10
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to stx-config (master)

Reviewed: https://review.openstack.org/600842
Committed: https://git.openstack.org/cgit/openstack/stx-config/commit/?id=17bf38c7c50144278a4b5ceb1fed5ddeb115a605
Submitter: Zuul
Branch: master

commit 17bf38c7c50144278a4b5ceb1fed5ddeb115a605
Author: Daniel Badea <email address hidden>
Date: Fri Sep 7 18:19:44 2018 +0000

    tox flake8, pep8 checks only .py files

    By default flake8 checks only *.py files. There are some
    python scripts that don't have .py extensions and therefore
    are skipped by flake8:

      sysinv/cmd/manage-partitions
      sysinv/cmd/query_pci_id
      sysinv/cluster/cluster_services_dump

    We should be using setuptools automatic script creation
    via entry_points instead and remove flake8 explicit
    check of these files.

    ---

    Fix issues reported by tox -e flake8 for
    sysinv/cmd/manage-partitions

    Change-Id: I3c1127b370e6f47768480f4723274c6a1e8b1fb7
    Closes-bug: #1791350

Changed in starlingx:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on stx-config (master)

Change abandoned by Daniel Badea (<email address hidden>) on branch: master
Review: https://review.openstack.org/600840

Ken Young (kenyis)
tags: added: stx.1.0
removed: stx.2018.10
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.