[code-quality] Astroid 2.0.1 vs 2.0.0 changes PyLint
Kay Hayen
kay.hayen at gmail.com
Sun Jul 22 04:10:45 EDT 2018
Hello there,
I think this is not the first time this has happened to me. I am
running PyLint on Travis, and as of recently, I fixed the PyLint
version to be ==2.0.0 which is still up to date. However, now it
installs Astroid 2.0.1 which causes this:
nuitka/nodes/NodeBases.py:273 E0237 assigning-non-slot
NodeBase.setCompatibleSourceReference Assigning to attribute
'effective_source_ref' not defined in class slots
nuitka/nodes/NodeBases.py:272 I0021 useless-suppression Useless
suppression of 'attribute-defined-outside-init'
The name or kind of message that PyLint outputs changed here it seems.
Plus I am getting what I consider a false alarm:
nuitka/Errors.py:37 E1133 not-an-iterable NuitkaNodeError.__str__
Non-iterable value self.args is used in an iterating context
This is self.args from Exception, as can be seen in the code here:
class NuitkaErrorBase(Exception):
pass
class NuitkaNodeError(NuitkaErrorBase):
# Try to output more information about nodes passed.
def __str__(self):
from nuitka.codegen.Indentation import indented
parts = [""]
for arg in self.args:
if hasattr(arg, "asXmlText"):
parts.append(indented("\n%s\n" % arg.asXmlText()))
else:
parts.append(arg)
parts.append("")
parts.append("The above information should be included in a
bug report.")
return '\n'.join(parts)
And then another regression:
nuitka/nodes/NodeMetaClasses.py:66 E1121 too-many-function-args
NodeCheckMetaClass.__new__ Too many positional arguments for
classmethod call
for this:
return ABCMeta.__new__(cls, name, bases, dictionary)
But my question basically it, do I need to also fixate the astroid
version, so that I can be sure that a PyLint 2.0.0 is behaving like
another PyLint 2.0.0 ? This has been driving me nuts this morning,
sort of.
Yours,
Kay
More information about the code-quality
mailing list