Merge ~powersj/cloud-init:enable-pylint into cloud-init:master
Status: | Merged |
---|---|
Merged at revision: | 35cf3415f9748c880db4d3c004f3410c3aa2cab2 |
Proposed branch: | ~powersj/cloud-init:enable-pylint |
Merge into: | cloud-init:master |
Diff against target: |
160 lines (+56/-9) 7 files modified
.pylintrc (+39/-0) cloudinit/net/network_state.py (+3/-2) cloudinit/sources/DataSourceAltCloud.py (+1/-2) cloudinit/sources/DataSourceOpenNebula.py (+2/-2) cloudinit/sources/__init__.py (+1/-1) cloudinit/url_helper.py (+1/-1) tox.ini (+9/-1) |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Server Team CI bot | continuous-integration | Approve | |
cloud-init Commiters | Pending | ||
Review via email: mp+320560@code.launchpad.net |
Commit message
test: enable pylint support in tox
Description of the change
Why enable pylint?
pylint has the ability to catch errors that pyflakes/flake8 simply wont. pylint sets the bar higher for what can get accepted in terms of quality.
This set of commits enables pylint to run without errors. This does not add it to the list of tests when running tox as I think that is something up for discussion. Please review the configuration and the changes to the code.
There are a number of legit errors that I have updated the code to avoid those errors. However, there are two places where a variable was changes from being instantiated as None to {}. This is due to pylint stating how a None object cannot be check for in (e.g. 'my_key' in variable, if variable is None). I really, really do not want to be breaking some existing infrastructure.
pylint output:
https:/
tox clean:
https:/
Integration test using Xenial:
https:/
There was an error fetching revisions from git servers. Please try again in a few minutes. If the problem persists, contact Launchpad support.
PASSED: Continuous integration, rev:faf81cf7e18 5c44c1e2f5638e0 0c4a132f5b1a40 /jenkins. ubuntu. com/server/ job/cloud- init-ci/ 151/ /jenkins. ubuntu. com/server/ job/cloud- init-ci/ nodes=metal- amd64/151 /jenkins. ubuntu. com/server/ job/cloud- init-ci/ nodes=metal- arm64/151 /jenkins. ubuntu. com/server/ job/cloud- init-ci/ nodes=metal- ppc64el/ 151 /jenkins. ubuntu. com/server/ job/cloud- init-ci/ nodes=metal- s390x/151 /jenkins. ubuntu. com/server/ job/cloud- init-ci/ nodes=vm- i386/151
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
Click here to trigger a rebuild: /jenkins. ubuntu. com/server/ job/cloud- init-ci/ 151/rebuild
https:/