MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / signature_of

Method signature_of

codegraph-kernel/src/python.rs:293–301  ·  view source on GitHub ↗

pythonExtractor.getSignature: params + ` -> returnType`.

(&self, node: Node)

Source from the content-addressed store, hash-verified

291
292 /// pythonExtractor.getSignature: params + ` -> returnType`.
293 fn signature_of(&self, node: Node) -> Option<String> {
294 let params = node.child_by_field_name("parameters")?;
295 let mut sig = self.text(params).to_string();
296 if let Some(ret) = node.child_by_field_name("return_type") {
297 sig.push_str(" -> ");
298 sig.push_str(self.text(ret));
299 }
300 Some(sig)
301 }
302
303 /// pythonExtractor.isAsync: the PREVIOUS SIBLING token is `async`.
304 fn is_async(&self, node: Node) -> bool {

Callers 2

extract_functionMethod · 0.45
extract_methodMethod · 0.45

Calls 1

textMethod · 0.45

Tested by

no test coverage detected