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

Function parse_fstring_error

crates/ruff_python_parser/src/string.rs:625–633  ·  view source on GitHub ↗
(source: &str)

Source from the content-addressed store, hash-verified

623 }
624
625 fn parse_fstring_error(source: &str) -> InterpolatedStringErrorType {
626 parse_suite(source)
627 .map_err(|e| match e.error {
628 ParseErrorType::Lexical(LexicalErrorType::FStringError(e)) => e,
629 ParseErrorType::FStringError(e) => e,
630 e => unreachable!("Expected FStringError: {:?}", e),
631 })
632 .expect_err("Expected error")
633 }
634
635 #[test]
636 fn test_parse_invalid_fstring() {

Callers

nothing calls this directly

Calls 2

map_errMethod · 0.80
parse_suiteFunction · 0.70

Tested by

no test coverage detected