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

Method signature_of

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

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

(&self, node: Node)

Source from the content-addressed store, hash-verified

382
383 /// pythonExtractor.getSignature: params + ` -> returnType`.
384 fn signature_of(&self, node: Node) -> Option<String> {
385 let params = node.child_by_field_name("parameters")?;
386 let mut sig = self.text(params).to_string();
387 if let Some(ret) = node.child_by_field_name("return_type") {
388 sig.push_str(" -> ");
389 sig.push_str(self.text(ret));
390 }
391 Some(sig)
392 }
393
394 /// pythonExtractor.isAsync: the PREVIOUS SIBLING token is `async`.
395 fn is_async(&self, node: Node) -> bool {

Callers 2

extract_functionMethod · 0.45
extract_methodMethod · 0.45

Calls 1

textMethod · 0.65

Tested by

no test coverage detected