Skip to content

unidiomatic-typecheck not flagged for type(x) is type(y) #10365

Open
@jacobtylerwalls

Description

@jacobtylerwalls

The spirit of unidiomatic-typecheck is to flag unidiomatic typechecks.

This is unidiomatic:

type(x) is type(y)

It should be one of:

isinstance(x, type(y))
issubclass(type(x), type(y))

Metadata

Metadata

Assignees

No one assigned

    Labels

    Enhancement ✨Improvement to a componentFalse Negative 🦋No message is emitted but something is wrong with the codeNeeds decision 🔒Needs a decision before implemention or rejection

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions