Skip to content

PLE2513 and format have different hex casing opinions #19788

@ember91

Description

@ember91

Summary

Minimal working example

Create a file with a string containing just the ASCII ESC character. For example like this in bash:

printf '"\x1b"\n' >file.py

Fix it:

ruff check --select PLE2513 --isolated ---fix file.py

It changed it to "\x1B" instead of ESC. Format it:

ruff format --isolated file.py

Now it's "\x1b"with a lowercase "b". I expected the checker and formatter to agree on the casing of the hexadecimal letters.

Version

0.12.7

Metadata

Metadata

Assignees

No one assigned

    Labels

    fixesRelated to suggested fixes for violationsgood first issueGood for newcomers

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions