How to fix pylint logging-not-lazy? [duplicate]

我的未来我决定 提交于 2019-11-28 21:00:01
Zada Zorg

This mean, that you should rewrite your code as:

logging.debug("detect mimetypes faild because %s", e)

Acording to https://docs.python.org/2/library/logging.html

Logger.debug(msg, *args, **kwargs)

... Logs a message with level DEBUG on this logger. The msg is the message format string, and the args are the arguments which are merged into msg using the string formatting operator. (Note that this means that you can use keywords in the format string, together with a single dictionary argument.) ...

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!