@federicomena (I've just read the thing about you being one of the creators of GNOME and I'm completely geeking out.)
@retazomag Oh, this is good stuff! Thank you!
@federicomena
following...
@brethil It is! Thank you!
@federicomena well I think aside some blogs, python best practices are "copy everything from a project you love" 😅
@federicomena
Black & Mypy are always a good place to start, and of course editor/tools often integrate with them (and can make your life much easier)
Sadly PyGObject can't provide type info, which can limit you a bit
@zbrown but what if it could 🤔 🤔 🤔
@federicomena I'm not entirely sure of the practicalities, we may need to make a mypy plug-in
Sadly PyGObject doesn't seem to get much attention these days :-(
@zbrown oh, wait, I'm thinking in terms of generating a binding statically with python type annotations, but that's not how it works...
Python does have "stubs" that provide metadata for untyped modules (indeed the stdlib is handled that way) or native/blackbox modules that otherwise couldn't be introspected
Some have sorta tried that for PyGObject, but the problem of course is that we don't really have a static API to provide static stubs for — different people have different versions of differents sets of GIRs
@federicomena so we'd probably need to either implement it in the type checker itself (as SQLAlchemy does for ORM stuff), or maybe add a checking mode to PyGObject itself (ultimately the metadata is "just" strings in a magic field)
@zbrown I think I'll have to learn a lot about Python to be useful in Orca-land... this is all really interesting; thanks for explaining.
@federicomena pytest is de facto standard for unit tests
@federicomena I always recommend this tutorial:
https://pycon.switowski.com/
The covers all the basics from setting up the IDE (VS Code in this case, but can mostly be replaced by VSCodium) to documenting and deploying an app.