On Jan 30, 2016 4:45 AM, "Elein Mustain" <[email protected]> wrote: > > 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 [email protected] > > > > > _______________________________________________ > code-quality mailing list > [email protected] > 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.
_______________________________________________ code-quality mailing list [email protected] https://mail.python.org/mailman/listinfo/code-quality
