Ryan Harper has uploaded a new change for review.
Change subject: pylint:vdsm/*.py cast output to str() for .strip()/splitlines() ......................................................................
pylint:vdsm/*.py cast output to str() for .strip()/splitlines()
************* Module caps E:187,35:osversion: Instance of 'list' has no 'splitlines' member (but some types could not be inferred ************* Module configNetwork E: 68,7:ifdown: Instance of 'list' has no 'strip' member (but some types could not be inferred) E: 70,7:ifdown: Instance of 'list' has no 'strip' member (but some types could not be inferred) E: 71,49:ifdown: Instance of 'list' has no 'splitlines' member (but some types could not be inferred) E: 80,7:ifup: Instance of 'list' has no 'strip' member (but some types could not be inferred) E: 82,7:ifup: Instance of 'list' has no 'strip' member (but some types could not be inferred) ************* Module netinfo E: 45,23:nics: Instance of '_Chainmap' has no 'split' member (but some types could not be inferred) E:137,22:ifconfig: Instance of 'list' has no 'split' member (but some types could not be inferred) ************* Module utils E:681,42:getHostUUID: Instance of 'list' has no 'splitlines' member (but some types could not be inferred)
wrapper command and config output with str() to help pylint.
Change-Id: Iae2c0ece02d5e41e0080bf41c0d9ea3544965274 Signed-off-by: Ryan Harper ryanh@us.ibm.com --- M vdsm/caps.py M vdsm/configNetwork.py M vdsm/netinfo.py M vdsm/utils.py 4 files changed, 9 insertions(+), 9 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/44/3444/1 -- To view, visit http://gerrit.ovirt.org/3444 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange Gerrit-Change-Id: Iae2c0ece02d5e41e0080bf41c0d9ea3544965274 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Ryan Harper ryanh@us.ibm.com
Saggi Mizrahi has posted comments on this change.
Change subject: pylint:vdsm/*.py cast output to str() for .strip()/splitlines() ......................................................................
Patch Set 1: Looks good to me, but someone else must approve
-- To view, visit http://gerrit.ovirt.org/3444 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Iae2c0ece02d5e41e0080bf41c0d9ea3544965274 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Ryan Harper ryanh@us.ibm.com Gerrit-Reviewer: Saggi Mizrahi smizrahi@redhat.com
Dan Kenigsberg has posted comments on this change.
Change subject: pylint:vdsm/*.py cast output to str() for .strip()/splitlines() ......................................................................
Patch Set 2:
But isn't this just a pylint bug? Process.communicate() always return two strings.
making pylint happy is good, but should we clutter vdsm for this? I really do not know.
-- To view, visit http://gerrit.ovirt.org/3444 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Iae2c0ece02d5e41e0080bf41c0d9ea3544965274 Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Ryan Harper ryanh@us.ibm.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Ryan Harper ryanh@us.ibm.com Gerrit-Reviewer: Saggi Mizrahi smizrahi@redhat.com
Ryan Harper has posted comments on this change.
Change subject: pylint:vdsm/*.py cast output to str() for .strip()/splitlines() ......................................................................
Patch Set 2:
I tend to agree with pylint bug. It's seems rather annoying to have to always do the str() casting. And it clear from runtime this works out fine. The other area of pylint "errors" stem from the same inability to detect the runtime association of types. The blog post talked about how to teach pylint more about your code; but that seemed like a lot of work for little benefit.
-- To view, visit http://gerrit.ovirt.org/3444 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Iae2c0ece02d5e41e0080bf41c0d9ea3544965274 Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Ryan Harper ryanh@us.ibm.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Ryan Harper ryanh@us.ibm.com Gerrit-Reviewer: Saggi Mizrahi smizrahi@redhat.com
oVirt Jenkins CI Server has posted comments on this change.
Change subject: pylint:vdsm/*.py cast output to str() for .strip()/splitlines() ......................................................................
Patch Set 2: No score
Build Started http://jenkins.ovirt.info/job/vdsm_unit_tests_by_patch/63/
-- To view, visit http://gerrit.ovirt.org/3444 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Iae2c0ece02d5e41e0080bf41c0d9ea3544965274 Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Ryan Harper ryanh@us.ibm.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Ryan Harper ryanh@us.ibm.com Gerrit-Reviewer: Saggi Mizrahi smizrahi@redhat.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: pylint:vdsm/*.py cast output to str() for .strip()/splitlines() ......................................................................
Patch Set 2:
Build Successful
http://jenkins.ovirt.info/job/vdsm_unit_tests_by_patch/63/ : SUCCESS
-- To view, visit http://gerrit.ovirt.org/3444 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Iae2c0ece02d5e41e0080bf41c0d9ea3544965274 Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Ryan Harper ryanh@us.ibm.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Ryan Harper ryanh@us.ibm.com Gerrit-Reviewer: Saggi Mizrahi smizrahi@redhat.com Gerrit-Reviewer: oVirt Jenkins CI Server
Saggi Mizrahi has posted comments on this change.
Change subject: pylint:vdsm/*.py cast output to str() for .strip()/splitlines() ......................................................................
Patch Set 2: Looks good to me, but someone else must approve
-- To view, visit http://gerrit.ovirt.org/3444 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Iae2c0ece02d5e41e0080bf41c0d9ea3544965274 Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Ryan Harper ryanh@us.ibm.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Ryan Harper ryanh@us.ibm.com Gerrit-Reviewer: Saggi Mizrahi smizrahi@redhat.com Gerrit-Reviewer: oVirt Jenkins CI Server
Antoni Segura Puimedon has posted comments on this change.
Change subject: pylint:vdsm/*.py cast output to str() for .strip()/splitlines() ......................................................................
Patch Set 2:
I always use pylint for my code, but it is severely limited in what it can do, since it does not even run imports, e.g., it has problems seeing object members that were declared in more than one level up in the class hierarchy.
As for this str issue... IMHO that should be a warning and .pylintrc should allow you to specify a set of methods with their return types, so we could kind of whitelist all of this without cluttering the code.
-- To view, visit http://gerrit.ovirt.org/3444 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Iae2c0ece02d5e41e0080bf41c0d9ea3544965274 Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Ryan Harper ryanh@us.ibm.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Ryan Harper ryanh@us.ibm.com Gerrit-Reviewer: Saggi Mizrahi smizrahi@redhat.com Gerrit-Reviewer: oVirt Jenkins CI Server
Ryan Harper has abandoned this change.
Change subject: pylint:vdsm/*.py cast output to str() for .strip()/splitlines() ......................................................................
Patch Set 2: Abandoned
Too Old
-- To view, visit http://gerrit.ovirt.org/3444 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: abandon Gerrit-Change-Id: Iae2c0ece02d5e41e0080bf41c0d9ea3544965274 Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Ryan Harper ryanh@us.ibm.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Ryan Harper ryanh@us.ibm.com Gerrit-Reviewer: Saggi Mizrahi smizrahi@redhat.com Gerrit-Reviewer: oVirt Jenkins CI Server
vdsm-patches@lists.fedorahosted.org