mirror of
https://github.com/astral-sh/ruff.git
synced 2025-07-24 05:25:17 +00:00
Normalise Hex and unicode escape sequences in string (#9280)
This commit is contained in:
parent
c716acc7a6
commit
5d4825b60f
10 changed files with 263 additions and 113 deletions
|
@ -118,3 +118,5 @@ test_particular = [
|
|||
b'c'
|
||||
)
|
||||
}
|
||||
|
||||
b"Unicode Escape sequence don't apply to bytes: \N{0x} \u{ABCD} \U{ABCDEFGH}"
|
||||
|
|
|
@ -133,3 +133,8 @@ x = (b"""aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa""" b"""bbbbbbbbbbbbbbbbbbbbbbbbbbb
|
|||
|
||||
# https://github.com/astral-sh/ruff/issues/7460
|
||||
trailing_preferred_quote_texts = [''' "''', ''' ""''', ''' """''', ''' """"''']
|
||||
|
||||
a = f"""\x1F"""
|
||||
a = """\x1F"""
|
||||
a = """\\x1F"""
|
||||
a = """\\\x1F"""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue