Skip to content

PLR1701: can be automatically fixed #4768

@saippuakauppias

Description

@saippuakauppias

Rule: https://beta.ruff.rs/docs/rules/repeated-isinstance-calls/

The text of the error provides an example to correct it, you can use it to fix it automatically.

It is important to note that if the settings option target-version is set to a version higher than 3.9 - you can use the syntax: isinstance(x, int | float)

Metadata

Metadata

Assignees

Labels

fixesRelated to suggested fixes for violations

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions