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

fix: incorrect type hints on memoize key #958 #959

Merged
merged 2 commits into from
Jan 29, 2025

Conversation

ntjess
Copy link
Contributor

@ntjess ntjess commented Jan 5, 2025

All Submissions:

Description of changes

Type hints now make code editors happy when caching non-hashable function inputs (fixes #958)

Copy link
Collaborator

@iisakkirotko iisakkirotko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @ntjess! Thanks a lot for the PR (and good spot on the issue)!

It seem that as of Python 3.12, importing typing.Hashable is deprecated (see the Python docs), and should be imported from collections.abc instead.

@ntjess
Copy link
Contributor Author

ntjess commented Jan 23, 2025

@iisakkirotko Done!

Copy link
Collaborator

@iisakkirotko iisakkirotko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

@maartenbreddels
Copy link
Contributor

Nice work, thanks Nathan!

@maartenbreddels maartenbreddels merged commit 26ebb83 into widgetti:master Jan 29, 2025
28 of 29 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.

Incorrect type hints on memoize key
3 participants