Handle user abandonment warning with pylint

Is there a way to tell pylint that it should display a warning message when it sees a custom obsolescence warning?

I tried warnings.warn, DeprecationWarning - but pylint ignores them.

+3
source share
1 answer

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).

+2
source

Source: https://habr.com/ru/post/1765300/


All Articles