frequenz-floss / frequenz-core-python

Core utilities to complement Python's standard library
https://frequenz-floss.github.io/frequenz-core-python/
MIT License
0 stars 2 forks source link

Bounds: Replace `Any`with `Self` in `Comparable` #13

Closed llucax closed 5 months ago

llucax commented 5 months ago

What's needed?

The Comparable protocol uses Any for the other parameter for comparisons.

Proposed solution

Use Self instead. mypy have some issues with this, so we might need to add more casts to make it work.

Additional context