-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Setting module search path in the config file #2323
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Yes, please. There's too much work with submitting stubs for 3rd party libraries to typeshed. I managed to side-step this problem by adding Here's my use case:
|
Yes, we should do this. @megapctr Do you feel up to submitting a PR for this? If not we can try to do it. |
I'm on it 👍 |
I agree that we want this, but for working on typeshed |
* Allow to specify mypy_path in config (#2323) * Docs on the new stubs_dir config option * Accept either a colon or a comma in config.mypy_path * Add a test for mypy_path config setting * Use os.pathsep instead of a colon * Use typeshed commit from master * Avoid cross-platform issues with mypy_path separators
Closed by #2329. |
I wonder if we should support configuring the module search path (equivalent to
MYPYPATH
) in the mypy config file. I have a feeling that this was discussed before, but maybe we can revisit this.Here's one particular use case I'm thinking about: specifying a directory for custom stubs. For example, I could have a
stubs/
subdirectory in my repository for custom stubs that I've written. It seems reasonable to be able to add this directory to the search path automatically so I won't always have to use a script that setsMYPYPATH
for running mypy correctly. If I use--silent-imports
, a mypy run with accidentally missing search path items will pass without errors and can easily generate false negatives.The text was updated successfully, but these errors were encountered: