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

Function parse_suite_with_recursion_limit

crates/ruff_python_parser/src/string.rs:548–557  ·  view source on GitHub ↗
(
        source: &str,
        max_recursion_depth: u16,
    )

Source from the content-addressed store, hash-verified

546 }
547
548 fn parse_suite_with_recursion_limit(
549 source: &str,
550 max_recursion_depth: u16,
551 ) -> Result<Suite, ParseError> {
552 parse(
553 source,
554 ParseOptions::from(Mode::Module).with_max_recursion_depth(max_recursion_depth),
555 )
556 .map(|parsed| parsed.try_into_module().unwrap().into_suite())
557 }
558
559 fn nested_format_spec(prefix: char, depth: usize) -> String {
560 let mut replacement_field = String::from("{spec}");

Calls 5

into_suiteMethod · 0.80
try_into_moduleMethod · 0.80
parseFunction · 0.70
mapMethod · 0.45