pygobject / pgi-docgen

API Documentation Generator for PyGObject
https://lazka.github.io/pgi-docs/
GNU Lesser General Public License v2.1
129 stars 36 forks source link

IDE auto completion #79

Open lazka opened 10 years ago

lazka commented 10 years ago

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

roelandxyz commented 6 years ago

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.

lazka commented 6 years ago

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?

roelandxyz commented 6 years ago

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

lazka commented 6 years ago

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..

bossjones commented 6 years ago

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.

kam193 commented 3 years ago

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

MrinmoyHaloi commented 2 years ago

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/