Skip to content

Conversation

@emmanuel-ferdman
Copy link
Contributor

PR Summary

This PR adds _from_iterable to AbstractSet (returning AbstractSet[Any] to allow subclasses that return set), and to KeysView/ItemsView which override it to return set[Any]. MutableSet inherits from AbstractSet so no separate definition is needed.

Fixes #15298.

Signed-off-by: Emmanuel Ferdman <emmanuelferdman@gmail.com>
@github-actions
Copy link
Contributor

Diff from mypy_primer, showing the effect of this PR on open source code:

discord.py (https://github.com/Rapptz/discord.py)
- ...typeshed_to_test/stdlib/typing.pyi:1049: note: "update" of "TypedDict" defined here
+ ...typeshed_to_test/stdlib/typing.pyi:1055: note: "update" of "TypedDict" defined here

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.

collections.abc.Set, etc., missing _from_iterable() classmethod

1 participant