single-cell-data / SOMA

A flexible and extensible API for annotated 2D matrix data stored in multiple underlying formats.
MIT License
69 stars 9 forks source link

[python] Remove the `Comparable` protocol #129

Closed thetorpedodog closed 1 year ago

thetorpedodog commented 1 year ago

We don't use it anymore, and it is not useful for static analysis (you only need to implement a subset of the methods to support all comparisons) nor at runtime (every object implements all of the __xx__ methods, but most return NotImplemented, meaning that isinstance(anything, Comparable) was always true even for things that were not comparable, like regular old object().