pgi-docgen icon indicating copy to clipboard operation
pgi-docgen copied to clipboard

IDE auto completion

Open lazka opened this issue 10 years ago • 7 comments

Provide fake python packages for IDE auto completion: most of the logic is already there, so why not

Existing code: https://github.com/strycore/fakegir

lazka avatar Jul 24 '14 14:07 lazka

Could this also be used to generate stubs for mypy and others? If Jedi will support stubs someday (https://github.com/davidhalter/jedi/issues/839), then this can also be used for auto completion. Mypy has a generator for stubs: 'python3 -m mypy.stubgen'. Maybe this can be used? Is has an option to use .rst docs, but I'm not sure how to use it for gi.

roelandm avatar Dec 12 '17 12:12 roelandm

Definitely sounds interesting. I haven't worked with mypy yet besides some small experiments, but I'm planning to give it a go in quodlibet some time.

One question is how we would provide those stubs to users and how jedi/mypy could discover them. Does anything similar exist already?

lazka avatar Dec 12 '17 12:12 lazka

There is typeshed: https://github.com/python/typeshed I think this is used by mypy/pycharm/pytype

roelandm avatar Dec 12 '17 12:12 roelandm

I've opened https://github.com/pygobject/pycairo/issues/99

my plan is to test things out with pycairo and then take it from there..

lazka avatar Feb 16 '18 10:02 lazka

Thank you for looking into this @lazka excited to see the possibilities. fakegir gets you most of the way there, but it is prone to issues and requires quite a bit of manual tweaking(Though I imagine any solution might require tweaking haha). If you need anyone to test this out, just ping me! Fyi, i'm on OS X, using vscode.

bossjones avatar Mar 07 '18 03:03 bossjones

Hey, @lazka I'd like to ask if you still plan to support stubs, I'm looking forward to using them :)

kam193 avatar Mar 27 '21 17:03 kam193

Hey, @lazka I'd like to ask if you still plan to support stubs, I'm looking forward to using them :)

https://github.com/pygobject/pygobject-stubs/

MrinmoyHaloi avatar Mar 24 '22 08:03 MrinmoyHaloi