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

TYP: to_dict use MutableMapping #796

Merged
merged 3 commits into from
Oct 11, 2023
Merged

TYP: to_dict use MutableMapping #796

merged 3 commits into from
Oct 11, 2023

Conversation

twoertwein
Copy link
Member

I couldn't use the TypeVar approach from pandas as pandas does not define the key/value type. MutableMappingT doesn't expect a subscript. Not sure how to do that.

Changing info: None =... to info: type[dict] =... caused some mypy errors.

Copy link
Collaborator

@Dr-Irv Dr-Irv left a comment

Choose a reason for hiding this comment

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

thanks @twoertwein

@Dr-Irv Dr-Irv merged commit e7d8661 into pandas-dev:main Oct 11, 2023
10 checks passed
@twoertwein twoertwein deleted the to_dict branch February 10, 2024 20:30
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.

Change to_dict to use MutableMapping instead of Mapping
2 participants