Closed ferdnyc closed 6 months ago
Heh. Seems when the .pyi
file was originally imported, the class members were alphabetized:
That got sorted out somewhere along the way, but the crazy constructor ordering stuck around.
Actually, now I'm definitely sure it's not, as here's the relevant contents of gi/overrides/Gdk.py
:
if GDK3:
# Introduced since Gtk-3.0
class RGBA(Gdk.RGBA):
def __init__(self, red=1.0, green=1.0, blue=1.0, alpha=1.0):
Gdk.RGBA.__init__(self)
self.red = red
self.green = green
self.blue = blue
self.alpha = alpha
In the
_Gdk3
stubs forGdk.RGBA
, it claims the constructor's signature is:__init__(self, blue, green, red, alpha)
. Pretty sure it's not! (It's kind of right there in the name, "R-G-B-A".)https://github.com/pygobject/pygobject-stubs/blob/15a36244c0684e176384a4dd15ff25a3ebf8cf12/src/gi-stubs/repository/_Gdk3.pyi#L3295-L3307
It almost looks like the colors were just blindly alphabetized, or something. (Though that wouldn't explain how
alpha
stayed at the end.)