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

Function nested_format_spec

crates/ruff_python_parser/src/string.rs:540–546  ·  view source on GitHub ↗
(prefix: char, depth: usize)

Source from the content-addressed store, hash-verified

538 }
539
540 fn nested_format_spec(prefix: char, depth: usize) -> String {
541 let mut replacement_field = String::from("{spec}");
542 for _ in 0..depth {
543 replacement_field = format!("{{foo:{replacement_field}}}");
544 }
545 format!(r#"{prefix}"{replacement_field}""#)
546 }
547
548 fn string_parser_escaped_eol(eol: &str) -> Suite {
549 let source = format!(r"'text \{eol}more text'");

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected