mirror of
https://github.com/astral-sh/ruff.git
synced 2025-08-03 18:28:56 +00:00
Use crates.io unicode_names2 0.6.0 (#6478)
Update `unicode_names2` to the crates.io release 0.6.0, removing a git dependency.
This commit is contained in:
parent
f872c3bf0f
commit
3ccd1d580d
6 changed files with 89 additions and 9 deletions
|
@ -23,7 +23,7 @@ is-macro = { workspace = true }
|
|||
itertools = { workspace = true }
|
||||
lalrpop-util = { version = "0.20.0", default-features = false }
|
||||
unicode-ident = { workspace = true }
|
||||
unicode_names2 = { version = "0.6.0", git = "https://github.com/youknowone/unicode_names2.git", rev = "4ce16aa85cbcdd9cc830410f1a72ef9a235f2fde" }
|
||||
unicode_names2 = { workspace = true }
|
||||
rustc-hash = { workspace = true }
|
||||
static_assertions = "1.1.0"
|
||||
|
||||
|
|
|
@ -1313,4 +1313,11 @@ u"foo" f"bar {baz} really" u"bar" "no"
|
|||
.unwrap();
|
||||
insta::assert_debug_snapshot!(parse_ast);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_unicode_aliases() {
|
||||
// https://github.com/RustPython/RustPython/issues/4566
|
||||
let parse_ast = parse_suite(r#"x = "\N{BACKSPACE}another cool trick""#, "<test>").unwrap();
|
||||
insta::assert_debug_snapshot!(parse_ast);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,32 @@
|
|||
---
|
||||
source: crates/ruff_python_parser/src/parser.rs
|
||||
expression: parse_ast
|
||||
---
|
||||
[
|
||||
Assign(
|
||||
StmtAssign {
|
||||
range: 0..37,
|
||||
targets: [
|
||||
Name(
|
||||
ExprName {
|
||||
range: 0..1,
|
||||
id: "x",
|
||||
ctx: Store,
|
||||
},
|
||||
),
|
||||
],
|
||||
value: Constant(
|
||||
ExprConstant {
|
||||
range: 4..37,
|
||||
value: Str(
|
||||
StringConstant {
|
||||
value: "\u{8}another cool trick",
|
||||
unicode: false,
|
||||
implicit_concatenated: false,
|
||||
},
|
||||
),
|
||||
},
|
||||
),
|
||||
},
|
||||
),
|
||||
]
|
Loading…
Add table
Add a link
Reference in a new issue