'How to disallow chained python imports via pylint

Is there a way to disallow chained imports via pylint?

I am talking about importing stuff from a module that again had imported and not implemented the stuff.

Example:

# module b
from a import foo
# module c
from b import foo

Which of course breaks c as soon as b stops using/importing foo.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source