"Go to definition" with `@patch`
Sometimes I use VSCode when editing notebooks. The "intellisense" features (powered by pylance/pyright) work surprisingly well.
I really like using @patch when adding methods to functions in notebooks as it really helps with the flow of the notebook and the ability to write prose.
Because @patch dynamically adds methods, features like "Go to definition" do not work. I believe that __dir__ does correctly present the right methods when writing a dot e.g. f = Foo(); f.<completion>.
I wanted to open this issue to see if there's any interest in getting something like this to work. I made the issue in nbdev instead of fastcore as I think there's a chance that some sort of nbdev processor could run through the notebooks, detect the patch annotation, and possibly generate stub files to let the IDE or completion tool e.g. Jedi know what methods have been added.
Just want to open this up to discussion. Thoughts?
I think it would be great if that worked! I'm not sure it's even possible though. If you can create some POC, that would be very interesting to look at.
@dleen once #1000 and #1001 are done, this should show clearly how to do this as an external plugin module. Does that sound like a reasonable next step for this?
@jph00 Yep - sounds perfect! Are you planning on tackling #1000 ?
Message ID: @.***>Yes I'm planning to handle them both.