I updated the pygame.transform.threshold function, tests and docs [0
Apart from that function being buggy and super confusing...

It was sort of a test of how we could improve all the pygame functions for
pygame 3000.
Whilst it still doesn't follow the new pygame C API yet[1
I wanted to try a few things like 'new' C features
(thanks ffmpeg for tricking MS into dragging their compiler into the 90s),
new docs features (param types, and examples) and such like.

It's quite a bit of C and python test changes,
and took me quite a few days longer than I expected.

One thing it does now is use sphinx type parameters.
Apart from the docs being improved, tools like
jedi autocomplete/type inference use them.

So, now editors like vim, sublime, and vscode can autocomplete with pygame.
(I had to change a few things for the 'odd' but 'cool' pygame
'missing module' imports feature so the type inference worked in jedi [2


For examples, sphinx can now easily include source code.
So we can include pygame.examples code, or even test cases.
The 'nulledge' python search code search doesn't seem all that good
for many pygame things, and it lacks https. So i'm thinking of dropping
that and manually linking to relevant examples/test code.

Additionally, we can link to github source code, and even
the documentation files themselves. Which is handy for
'edit this'/'fork on github' style buttons.

I guess the tests could be improved a lot to be more clear. Along with the
C code even.
But I'm fairly over cleaning all that up for now... lol.

Still, I would still appreciate a review if anyone can be bothered.


[0] threshold function pr, https://github.com/pygame/pygame/pull/408
[1] pygame C api issue, https://github.com/pygame/pygame/issues/333
[2] jedi confused with pygame pr, https://github.com/pygame/pygame/pull/413

Reply via email to