mirror of
https://github.com/astral-sh/ruff.git
synced 2025-08-03 10:22:24 +00:00
Rename ExprStringLiteral::as_unconcatenated_string()
to ExprStringLiteral::as_single_part_string()
(#16253)
This commit is contained in:
parent
97d0659ce3
commit
25920fe489
10 changed files with 50 additions and 45 deletions
|
@ -56,7 +56,7 @@ pub fn parse_type_annotation(
|
|||
string_expr: &ExprStringLiteral,
|
||||
source: &str,
|
||||
) -> AnnotationParseResult {
|
||||
if let Some(string_literal) = string_expr.as_unconcatenated_literal() {
|
||||
if let Some(string_literal) = string_expr.as_single_part_string() {
|
||||
// Compare the raw contents (without quotes) of the expression with the parsed contents
|
||||
// contained in the string literal.
|
||||
if &source[string_literal.content_range()] == string_literal.as_str() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue