Hoo boy. I pulled out the stuff related to Command and Fragment into two modules. This helped me by getting them into separate files, and I could rename Fragment to also be Command. This is a bit awkward, but it's all right for now. At least it's possible, with the classes living in separate modules.
One thing I discovered from investigating the CmdMeta class and related functions, was that I'd gotten some of the method signatures wrong, in a way that I'd have expected mypy to catch, but I guess there were too many Anys in there. We'll see if this works better once I've actually run some of this code.
If I want more substantial posts from these rewrites, I should probably write them as I work on the code. As it is, I'm trying to remember what exactly I did, and I'm like "Man, that was like ten hours ago, that's ancient history."
Anyway, I'll be able to work on stuff more intensely in a few days. I don't know if I actually will, but I'll be able to.
Anyway, I'm not going to push myself any further tonight, so I'm done for now. In any case, soon.