We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I am making a feature request for mypy, not raising a bug.
Within one repository, here is a use case:
pip install
import
mypy -p <folder>
Spoiler alert, this is my use case. I would like to run mypy from the repo root, which requires one to invoke mypy via something like:
mypy -p rel/path/to/package
However, currently, it seems package names don't support slashes. When I enter mypy -p tests/packagename, here's my output:
mypy -p tests/packagename
Package name 'tests/packagename' cannot have a slash in it.
TL;DR the feature request: enable mypy support of relative paths to packages when using -p PACKAGE.
-p PACKAGE
Versions
mypy==0.782 Python==3.6.5
The text was updated successfully, but these errors were encountered:
You know the workaround is simple, right? The way -p is intended to work is
-p
export MYPYPATH=tests mypy -p packagename
Sorry, something went wrong.
Haha thank you @gvanrossum ! That's exactly what I needed, I am very grateful.
I now think this feature request is unnecessary, so I am closing it.
I am a bit embarrassed, and will be re-reading the mypy docs on import discovery :)
No branches or pull requests
I am making a feature request for mypy, not raising a bug.
Within one repository, here is a use case:
pip install
andimport
example use cases from the unit test filesmypy -p <folder>
Spoiler alert, this is my use case. I would like to run mypy from the repo root, which requires one to invoke mypy via something like:
However, currently, it seems package names don't support slashes. When I enter
mypy -p tests/packagename
, here's my output:TL;DR the feature request: enable mypy support of relative paths to packages when using
-p PACKAGE
.Versions
The text was updated successfully, but these errors were encountered: