Skip to content

BUG/TST: fixed series apply frozenset error and created test case #903

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

Merged
merged 7 commits into from
Apr 9, 2024

Conversation

teshao
Copy link
Contributor

@teshao teshao commented Apr 6, 2024

When trying to use series.Apply() on "frozenset", it raises the following error:

error: Argument 1 to "apply" of "Series" has incompatible type "type[frozenset[Any]]"; expected "Callable[..., str | bytes | date | datetime | timedelta | datetime64 | timedelta64 | bool | int | float | Timestamp | Timedelta | complex | Sequence[Any] | set[Any] | Mapping[Any, Any] | NAType | None]" [arg-type]

Fixed this by adding "frozenset" to the enumerated Callable output types.
Created a test case by calling series.Apply(frozenset) and running "poe mypy".

@twoertwein twoertwein requested a review from Dr-Irv April 8, 2024 01:29
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 @teshao

@Dr-Irv Dr-Irv merged commit 9dd9eee into pandas-dev:main Apr 9, 2024
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.

Series apply frozenset raises error, frozenset not in enumerated Callable output types
3 participants