Closed
Description
I am making a feature request for mypy, not raising a bug.
Within one repository, here is a use case:
- Package that follows native namespace packaging conventions.
- In a separate directory: unit tests, which are grouped as a native namespace package as well.
- This is done so others can
pip install
andimport
example use cases from the unit test files
- This is done so others can
- One mypy config file, located in repo root
- Both the package + unit tests are type checked via mypy
- Note per this comment: for PEP 420 support, mypy should be invoked via
mypy -p <folder>
- Note per this comment: for PEP 420 support, mypy should be invoked via
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:
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
.
Versions
mypy==0.782
Python==3.6.5
Metadata
Metadata
Assignees
Labels
No labels