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

Function parse_fstring_error

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

Source from the content-addressed store, hash-verified

628 }
629
630 fn parse_fstring_error(source: &str) -> InterpolatedStringErrorType {
631 parse_suite(source)
632 .map_err(|e| match e.error {
633 ParseErrorType::Lexical(LexicalErrorType::FStringError(e)) => e,
634 ParseErrorType::FStringError(e) => e,
635 e => unreachable!("Expected FStringError: {:?}", e),
636 })
637 .expect_err("Expected error")
638 }
639
640 #[test]
641 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