-
Notifications
You must be signed in to change notification settings - Fork 19
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
Use a specific working directory to run dmypy
in
#89
Comments
Thanks for the report. I could definitely add an option for the working directory. Can you give me minimal instructions how to reproduce your issue with mypy.ini not working properly? |
Sure! I've made a repro repository here. Instructions are in the README, let me know if you need something else 😄 |
Thanks for making the nice reproduction repo! and sorry for the delay... I tested your repo. You're right with your interpretation. The exclude rules in mypy.ini are being interpreted relative to mypy's cwd, and not relative to the location of mypy.ini. Thus, the solution for your special use-case is like you requested, to set the working directory. This is not a difficult feature to add. |
what about letting mypy look in any subdirectory?:
|
@evbo, your comment doesn't seem related to this repo. It is related to Microsoft's mypy extension. |
oh sorry, well it works too though :) |
I'm working on a monorepo where all Python files, including the
mypy.ini
, are in a specific subfolder (e.g.mypythonstuff
).While I can use
mypy.targets
andmypy.configFile
options to select the subfolder in question, I don't think it's working: it seems that the mypy.ini's package-specific settings are completely ignored (maybe because mypy considers the full path to these packages to bemypythonstuff.foo.bar
instead offoo.bar
🤔 )An easy workaround would be to just open the
mypythonstuff
folder in a separate VS Code window, or as a workspace folder, but that is somewhat more annoying than just being able to set dmypy's current working directory.(this is similar to #82, but for a single folder)
The text was updated successfully, but these errors were encountered: