Closed dimbleby closed 6 months ago
as currently typed, mypy complains:
keyring/backends/fail.py:18: error: Signature of "priority" incompatible with supertype "KeyringBackend" [override] keyring/backends/fail.py:18: note: Superclass: keyring/backends/fail.py:18: note: classproperty[float] keyring/backends/fail.py:18: note: Subclass: keyring/backends/fail.py:18: note: classproperty[int]
etc
but per https://peps.python.org/pep-0484/#the-numeric-tower, if you want float | int, floatdoes just fine. And now mypy is not unhappy with the typing of priority().
float | int
float
priority()
Aha. I addressed this issue in #667 and other typing issues in earlier commits, but I took a different approach. Let me resolve the conflicts and see what the new diff is.
as currently typed, mypy complains:
etc
but per https://peps.python.org/pep-0484/#the-numeric-tower, if you want
float | int
,float
does just fine. And now mypy is not unhappy with the typing ofpriority()
.