metaflow
metaflow copied to clipboard
IDEs (e.g. PyCharm) don't recognize Metaflow decorators
Metaflow decorators are imported at the runtime, so IDEs can't find them based on static analysis. We could find a way to make the setup more IDE-friendly.
Context: https://gitter.im/metaflow_org/community?at=5f8e151898a7774f1b53afc6
Hello, any update on this? Would love to help improve this. Will be very helpful for beginners to understand how to use decorators and options it has without having to open the document
@bsridatta there has been some progress on this issue: You can get tooltips now for many Metaflow's public APIs, like self.next, metaflow.S3 etc.
Decorators are a bit of a special case because they are constructed dynamically on the fly, making it harder for IDEs to recognize them. We are still working on to fix that issue
Got it @tuulos , thanks for the quick reponse!
Yes its only decorators that are without tool tips. Although other modules throw warnings, not a problem but just sharing. For example FlowSpec shows warning like below in VSCode.
"FlowSpec" is not exported from module "metaflow"
Import from "metaflow.flowspec" instead
This should be fixed by #1557
Still have the issue. Any fixes?
Worked for me
pip install metaflow-stubs -U
It should be added to docs.