diff --git a/crates/ruff_python_parser/src/typing.rs b/crates/ruff_python_parser/src/typing.rs index 9e73db625644a..02ebf3243c0b3 100644 --- a/crates/ruff_python_parser/src/typing.rs +++ b/crates/ruff_python_parser/src/typing.rs @@ -22,13 +22,11 @@ pub enum AnnotationKind { Complex, } -/// Parse a type annotation from a string. +/// Parses the value of a string literal node (`parsed_contents`) with `range` as a type +/// annotation. The given `source` is the entire source code. pub fn parse_type_annotation( - // Parsed contents of the string literal node that represents this type annotation. parsed_contents: &str, - // Range of the string literal node that represents this type annotation. range: TextRange, - // The source code. source: &str, ) -> Result<(Expr, AnnotationKind)> { let expression = &source[range];