문제

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?

도움이 되었습니까?

해결책

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.

다른 팁

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

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top