[Python] How to point to custom stubs directory in mypy via MYPY environment variable or...

Discussão em 'Python' iniciado por Stack, Julho 10, 2025.

  1. Stack

    Stack Membro Participativo

    I have created a stub file and put it along side of the original file as suggested. However I get missing library stubs or py.typed marker error. I tried adding the stubs directory using mypy_path variable in my config file. Still getting the same error. Any suggestions? This is how I am initiating mypy:

    mypy --namespace-packages --explicit-package-bases --config-file <setup.cfg> <mypy_file_to_typehint>


    My setup.cfg has the following:

    [mypy]
    mypy_path = <directory path>

    Continue reading...

Compartilhe esta Página