Skip to content

PLR6104 rewrites numbers w/o the base indicator #11672

@Avasam

Description

@Avasam

input

test = 0x5
test = test + 0xBA

test2 = b""
test2 = test2 + b"\000"

Run ruff check --fix --unsafe-fixes --preview --select=PLR6104 --isolated

output

test = 0x5
test += 186

test2 = b""
test2 += b"\x00"

Ruff version 0.4.7

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingfixesRelated 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