pygobject / pygobject-stubs

PEP 561 Typing Stubs for PyGObject
GNU Lesser General Public License v2.1
74 stars 26 forks source link

imprv: generate: Hint callbacks #145

Open matperc opened 1 year ago

matperc commented 1 year ago

~Blocked by this bug https://github.com/python/mypy/issues/15177~

Closes #144 Closes #149

matperc commented 1 year ago

The bug in mypy is fixed so it should work now.

@lovetox can you test on your code base if everything works fine?

matperc commented 1 year ago

~There is a problem on typing with Gio.AsyncReadyCallback it should take var args~

I've fixed this. It works now, I'll leave the draft status since it works only with mypy master.

matperc commented 11 months ago

With mypy 1.7 it's working. Before merge please check if it is working as expected in your codebase

lovetox commented 9 months ago

This generates for me invalid python, if i try it on Gtk3

xoptions=<flags GTK_EXPAND | GTK_FILL of type Gtk.AttachOptions>

also please make a second space between code and FIXME comment

: ... # FIXME Function -> : ... # FIXME Function

This reduces the work the formatter has to do

lovetox commented 9 months ago

oh it seems its not this MR that does this, i have this also on master

I added https://github.com/pygobject/pygobject-stubs/issues/169

lovetox commented 9 months ago

i tested this and didnt run into any problems with the MR.

matperc commented 8 months ago

also please make a second space between code and FIXME comment

: ... # FIXME Function -> : ... # FIXME Function

This reduces the work the formatter has to do

Is this related to this PR?