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.