Since warnings.warn& c is intended to be run-time, Pylint does not see anything strange in them by default. To change this, I think you need to follow (extended and meager) documents to write your own check , with which you can issue warnings on any source characteristics (either raw or compiled at the AST level).
source
share