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

Method deserialize

crates/ruff_python_ast/src/python_version.rs:185–192  ·  view source on GitHub ↗
(deserializer: D)

Source from the content-addressed store, hash-verified

183
184 impl<'de> serde::Deserialize<'de> for PythonVersion {
185 fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
186 where
187 D: serde::Deserializer<'de>,
188 {
189 String::deserialize(deserializer)?
190 .parse()
191 .map_err(serde::de::Error::custom)
192 }
193 }
194
195 impl serde::Serialize for PythonVersion {

Callers

nothing calls this directly

Calls 3

deserializeFunction · 0.85
map_errMethod · 0.80
parseMethod · 0.45

Tested by

no test coverage detected