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

Function parse_fstring_error

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

Source from the content-addressed store, hash-verified

645 }
646
647 fn parse_fstring_error(source: &str) -> InterpolatedStringErrorType {
648 parse_suite(source)
649 .map_err(|e| match e.error {
650 ParseErrorType::Lexical(LexicalErrorType::FStringError(e)) => e,
651 ParseErrorType::FStringError(e) => e,
652 e => unreachable!("Expected FStringError: {:?}", e),
653 })
654 .expect_err("Expected error")
655 }
656
657 #[test]
658 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