Abstract properties can be fulfilled by setting an attribute on the class itself, and using Final makes the type checker yell if you try to change it.
This used to be a much fancier idea that used descriptors to do more or less the same thing, but it would also ensure that nobody would change it at runtime. (That would have looked like this: https://github.com/single-cell-data/SOMA/commit/967ff84cdf30bb82b8caec84ad46097270e6dd13.) I don’t think the additional code there is worth it, though, since Final gives us (and users) static analysis security (and if users do start monkeying around with SOMA internals, if they break it they get to keep both pieces).
Abstract properties can be fulfilled by setting an attribute on the class itself, and using
Final
makes the type checker yell if you try to change it.This used to be a much fancier idea that used descriptors to do more or less the same thing, but it would also ensure that nobody would change it at runtime. (That would have looked like this: https://github.com/single-cell-data/SOMA/commit/967ff84cdf30bb82b8caec84ad46097270e6dd13.) I don’t think the additional code there is worth it, though, since Final gives us (and users) static analysis security (and if users do start monkeying around with SOMA internals, if they break it they get to keep both pieces).