*.pyi files are not picked up by remote interpreter


*.pyi files from manually added to a remote interpreter paths are not resolved by IDE when symbols from these files are used.

I checked `External Libraries` in Project Window, and corresponding folders have only __init__.py files, *.pyi aren't synched.

Is it expected behavior for remote interpreters?



So you import something from your *.pyi files and PyCharm doesn't resolve it?

Would it be possible to provide a screenshot showing the problem and another one showing the location of these *.pyi files?


Sure, here's more details on the problem:

# There's a folder on remote server with the following layout:
# package/name/__init__.py <-- empty
# package/name/fileA.py <-- contains A
# package/name/fileB.pyi <-- contains B

# OK
from package.name.fileA import A

# Two problems: "cannot find reference 'fileB' in __init__.py" and "unresolved reference B"
from package.name.fileB import B

Locally, .py files exist in External Libraries for the remote interpreter, but not *.pyi


Thanks for clarification!

This one indeed seems relevant https://youtrack.jetbrains.com/issue/PY-31189. PyCharm doesn't download remote *.pyi files and thus they are not shown in External Libraries. Then it is also expected that it fails to import.

Please vote for the issue and follow for updates.


Please sign in to leave a comment.