I have a custom module loader that basically does some redirection. I would like pylint to recognize this custom loader. This is my situation:
root/
__init__.py
new/
__init__.py
foo.py
bar.py
old/
__init__.py
I have a lot of clients importing old.foo
. I wrote a custom loader in old/__init__.py
to redirect these to import new.foo
under the hood. How do I get pylint to recognize this? When it lints import old.foo
, it complains that it can't find old.foo
. This is only a problem with pylint. I can get client code to recognize the custom loader without any issue.