Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

simplify and fix typing of priority() #666

Merged
merged 4 commits into from
Feb 27, 2024
Merged

simplify and fix typing of priority() #666

merged 4 commits into from
Feb 27, 2024

Conversation

dimbleby
Copy link
Contributor

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().

@jaraco
Copy link
Owner

jaraco commented Feb 27, 2024

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.

@jaraco jaraco merged commit f34f4e4 into jaraco:main Feb 27, 2024
13 of 14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants