Skip to content

UP038 documentation outdated wrt. fix safety #13051

@VeckoTheGecko

Description

@VeckoTheGecko

Docs mention "Fix is always available." but it is flagged as unsafe in the code

ruff --version
ruff 0.6.1

Code

with isinstance(2, (int,float)) I get

test.py:1:1: UP038 Use `X | Y` in `isinstance` call instead of `(X, Y)`
  |
1 | isinstance(2, (int, float))
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ UP038
  |
  = help: Convert to `X | Y`

Found 1 error.
No fixes available (1 hidden fix can be enabled with the `--unsafe-fixes` option).

Related to #2923

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions