MCPcopy Index your code
hub / github.com/RustPython/RustPython / find_signature

Function find_signature

crates/vm/src/builtins/type.rs:2268–2272  ·  view source on GitHub ↗
(name: &str, doc: &'a str)

Source from the content-addressed store, hash-verified

2266}
2267
2268fn find_signature<'a>(name: &str, doc: &'a str) -> Option<&'a str> {
2269 let name = name.rsplit('.').next().unwrap();
2270 let doc = doc.strip_prefix(name)?;
2271 doc.starts_with('(').then_some(doc)
2272}
2273
2274pub(crate) fn get_text_signature_from_internal_doc<'a>(
2275 name: &str,

Callers 2

Calls 5

strip_prefixMethod · 0.80
starts_withMethod · 0.80
unwrapMethod · 0.45
nextMethod · 0.45
rsplitMethod · 0.45

Tested by

no test coverage detected