mkinit icon indicating copy to clipboard operation
mkinit copied to clipboard

Import from pyi files

Open LEv145 opened this issue 3 years ago • 2 comments

I have .pyi file with typings and mkinit ignores it and does not import

LEv145 avatar Feb 06 '22 12:02 LEv145

from .songbird import (
    ...
)
# <AUTOGEN_INIT>
pass
# </AUTOGEN_INIT>

And if you do so, then it does not add the imports from .songbird(songbird.pyi) to __all__

LEv145 avatar Feb 06 '22 12:02 LEv145

I don't think anything except type-checkers themselves support pyi files. IIUC, types from pyi files don't even get added as __annotations__.

I would need a more detailed example of what information a pyi file could have than the corresponding py file that mkinit could use, because as the moment I don't quite understand, all of the function names should be introspectable from py files alone, unless I'm missing something.

Erotemic avatar Feb 06 '22 19:02 Erotemic