"ModuleNotFoundError: No module named 'scripts'" due to overriding the 'mypy' entry point
Closed this issue · 2 comments
When installing the redisvl library, either directly or indirectly through dependencies like langchain-redis, the first-party mypy entry point (which we use for type-checking our Python code) gets overridden by your scripts:mypy entry point:

Which raises an error when we try to run mypy in our CI:

Your revised version is quite clear! Here’s a minor tweak to make it even more concise:
However, the issue is inconsistent and difficult to reproduce. It took me an entire day to identify the root cause, as it only occurred in our CI Docker runner. The problem arises because redisvl is usually installed after mypy in our CI (when using a lockfile).
My current workaround is to use the module syntax "python -m mypy" for running mypy.
@AlirezaRoshanzamir thanks for the input! After touching base with the team it seems we should rename or script to help avoid this collision. We have made the following pr for this #245.