Skip to content

Conversation

@AlexWaygood
Copy link
Member

As discussed in #6574, it is very easy to confuse collections.abc.Set with typing.Set (collections.abc.Set is, in fact, equivalent to typing.AbstractSet, rather than builtins.set/typing.Set).

This PR proposes only ever importing collections.abc.Set with the alias AbstractSet.

@AlexWaygood AlexWaygood marked this pull request as ready for review December 27, 2021 15:58
@github-actions
Copy link
Contributor

According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉

Copy link
Collaborator

@srittau srittau left a comment

Choose a reason for hiding this comment

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

Good idea.

@srittau srittau merged commit 975b3e9 into python:master Dec 27, 2021
@AlexWaygood AlexWaygood deleted the abstract-set branch December 27, 2021 16:12
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