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

Method is_static

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

pythonExtractor.isStatic: preceding decorator mentioning `staticmethod`.

(&self, node: Node)

Source from the content-addressed store, hash-verified

402
403 /// pythonExtractor.isStatic: preceding decorator mentioning `staticmethod`.
404 fn is_static(&self, node: Node) -> bool {
405 if let Some(prev) = node.prev_named_sibling() {
406 if prev.kind() == "decorator" {
407 return self.text(prev).contains("staticmethod");
408 }
409 }
410 false
411 }
412
413 // --- visitNode ------------------------------------------------------------
414

Callers 2

extract_functionMethod · 0.45
extract_methodMethod · 0.45

Calls 1

textMethod · 0.65

Tested by

no test coverage detected