Skip to content

Apply the None rule only to callable protocol members. #3938

Closed
@ilevkivskyi

Description

@ilevkivskyi

Currently mypy applies the rule that things like __iter__ = None block protocol implementation. However, it is applied only to dunder attributes, which is too ad-hoc (also there are names like send and throw in collections.abc). It is proposed in python/typing#464 that it should be applied only to methods (callable members) which would be more consistent.

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions