#1067172 ruff: E999 SyntaxError: Got unexpected unicode

Package:
ruff
Source:
ruff
Description:
Fast linter for Python, written in Rust
Submitter:
Jakub Wilk
Date:
2024-03-19 17:15:04 UTC
Severity:
normal
Tags:
#1067172#3
Date:
2024-03-19 17:10:25 UTC
From:
To:
ruff can't parse some \N{} sequences correctly, e.g.:

    $ cat stx.py
    print(ascii('\N{STX}'))

    $ python3 stx.py
    '\x02'

    $ ruff check stx.py
    error: Failed to parse stx.py:1:17: Got unexpected unicode
    stx.py:1:17: E999 SyntaxError: Got unexpected unicode
    Found 1 error.

As far as I can see, it's already fixed upstream; I can't reproduce it
with upstream ruff 0.3.3.