Thank you. This is helpful.
elein mustain@adobe.commailto:mustain@adobe.com
510-637-9106
On Jan 29, 2016, at 11:02 PM, Claudiu Popa
Please copy me on any responses.
Question: Why is pylint saying my parameters to a function are undefined?
$ pylint --version Warning: option include-ids is deprecated and ignored. Warning: option symbols is deprecated and ignored. pylint 1.3.0, astroid 1.4.4, common 1.0.2 Python 2.7.9 (default, Jan 18 2016, 18:45:02) [GCC 4.4.7 20120313 (Red Hat 4.4.7-3)] $ python --version Python 2.7.9
--- xxxx.py --- """ Not missing docstring """
def printem(a, b): print a+b
if __name__ == '__main__': xxx = "abc" yyy = "def" printem(xxx, yyy)
---- pylint output --- $ pylint xxxx.py Warning: option include-ids is deprecated and ignored. Warning: option symbols is deprecated and ignored. ************* Module xxxx E: 6,10: Undefined variable 'a' (undefined-variable) E: 6,12: Undefined variable 'b' (undefined-variable) ...
elein mustain@adobe.commailto:mustain@adobe.com
_______________________________________________ code-quality mailing list code-quality@python.orgmailto:code-quality@python.org https://mail.python.org/mailman/listinfo/code-quality
Hi, You need to use the latest version of pylint, 1.5, with astroid 1.4.x, in order for this to work. There are some incompatibilities between older.versions which leads to having this false positive.