Question

I can disable the following warning completely:

W0141: Used builtin function %r Used when a black listed builtin function is used (see the bad-function option). Usual black listed functions are the ones like map, or filter , where Python offers now some cleaner alternative like list comprehension.

But is there also a way to remove one function from the black list?

Was it helpful?

Solution

You can generate a rc file for pylint. (See pylint doc how to do this)

Within that you'll find something like this:

bad-functions=map,filter,apply,input

There you can simply remove the annoying function. If you're using Eclispe go afterwards to PyLint's preferences and add --rcfile=path\to\your_rc_file in the arguments for pylint input box.

OTHER TIPS

Just listen to Pylint and get rid of the offending usage of that black listed function using a cleaner alternative such as list comprehension.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top