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

Method signature_of

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

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

(&self, node: Node)

Source from the content-addressed store, hash-verified

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