jorgenschaefer / elpy

Emacs Python Development Environment
GNU General Public License v3.0
1.9k stars 260 forks source link

Question: can elpy use stub .pyi files (e.g. for gRPC) #2049

Open space88man opened 3 months ago

space88man commented 3 months ago

Summary

How to get Elpy to use type information and completions from stubs *.pyi files

Steps to reproduce

Create a Python project using gRPC (grpcio-tools, grpcio). The generated files xxxx_pb2_grpc.py and xxxx_pb2.py are usually quite obscure(obfuscated??). The gRPC/protobuf code generator, in addition, creates stubs *.pyi files with "interface"-like information.

vscode will use the stub file for code navigation and completions.

My configuration

OS

Linux

Result of (elpy-config)

N/A

Elpy configuration in my init.el

N/A

gopar commented 3 months ago

This is question for jedi which is what elpy relies on to get auto completion. You'll have to look up documentation if that's possible with jedi first. Would be curious to know what the jedi documentation says about this