MCPcopy Create free account
hub / github.com/astral-sh/ruff / parse_unchecked

Function parse_unchecked

crates/ruff_python_parser/src/lib.rs:289–291  ·  view source on GitHub ↗

Parse the given Python source code using the specified [`ParseOptions`]. This is same as the [`parse`] function except that it doesn't check for any [`ParseError`] and returns the [`Parsed`] as is.

(source: &str, options: ParseOptions)

Source from the content-addressed store, hash-verified

287/// This is same as the [`parse`] function except that it doesn't check for any [`ParseError`]
288/// and returns the [`Parsed`] as is.
289pub fn parse_unchecked(source: &str, options: ParseOptions) -> Parsed<Mod> {
290 Parser::new(source, options).parse()
291}
292
293/// Parse the given Python source code using the specified [`PySourceType`].
294pub fn parse_unchecked_source(source: &str, source_type: PySourceType) -> Parsed<ModModule> {

Calls 1

parseMethod · 0.45