Firstly, you can peep the example code here: https://paste.pythondiscord.com/EZ6Q
My big question here is why does class A seem fine to MyPy, but class B gives an error? Is there some way I can make the function B work? It's for instances when the bar_cls arguments fulfill my "modifications" to the class, and I don't need to define a class using the class keyword as I won't need to modify it's inner functions or anything. If the answer is that I just need to construct all of these subclasses like A then I guess that works too.
Using python 3.12