Type checkers are your friend if you can enforce them. I’ve started using them in my new projects and find that they make those types of bugs harder to sneak in, especially if you’re strict about requiring type hints/definitions in your functions and classes.
I like ty, but it’s immature. Check out Pyright as well.













I’ve never met a desktop GUI bigger than a single page with buttons that wasn’t messy and complicated.
Granted, I’m used to Qt in C++ and python, so I don’t think I’m the best sample collector.