Skip to content

MYPYPATH doesn't respect PEP420 namespace packages#1645

@mr-rodgers

Description

@mr-rodgers

Take this directory tree:

/path/to/src └───namespace └───package │ __init__.py │ └───__pycache__ __init__.cpython-35.pyc 

And this MYPYPATH:

> $env:MYPYPATH /path/to/src 

then running mypy -p namespace.package gives:

> mypy -p namespace.package Can't find package 'namespace.package' 

However, mypy works fine when you add an empty __init__.py into namepace (turning it into a regular package).

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions