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

Method signature_of

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

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

(&self, node: Node)

Source from the content-addressed store, hash-verified

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