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

Function parse_tstring_error

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

Source from the content-addressed store, hash-verified

740 }
741
742 fn parse_tstring_error(source: &str) -> InterpolatedStringErrorType {
743 parse_suite(source)
744 .map_err(|e| match e.error {
745 ParseErrorType::Lexical(LexicalErrorType::TStringError(e)) => e,
746 ParseErrorType::TStringError(e) => e,
747 e => unreachable!("Expected TStringError: {:?}", e),
748 })
749 .expect_err("Expected error")
750 }
751
752 #[test]
753 fn test_parse_invalid_tstring() {

Callers

nothing calls this directly

Calls 2

map_errMethod · 0.80
parse_suiteFunction · 0.70

Tested by

no test coverage detected