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:
konsti 2023-10-03 00:17:38 +02:00 committed by GitHub
parent f872c3bf0f
commit 3ccd1d580d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 89 additions and 9 deletions

View file

@ -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);
}
}

View file

@ -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,
},
),
},
),
},
),
]