Skip to content

Check for pseudo-Protocols in argument types #508

@srittau

Description

@srittau

There are a few ABCs that look deceptively like protocols, but aren't, for example Sequence or Mapping. We usually have good protocol alternatives for these in typeshed, but it's easy to slip in one of these pseudo-protocols by accident. Edit: It makes sense to at least explicitly acknowledge the intentional use of these by adding a # noqa comment.

We should warn about using these in argument types, but probably as an opt-in warning (which we could eventually enable in typeshed).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions