MCPcopy Create free account
hub / github.com/Houseofmvps/codesight / call_leaf

Function call_leaf

plugins/ast/python/src/lib.rs:564–570  ·  view source on GitHub ↗

Last dotted segment of a call target: `Column` -> "Column", `models.CharField` -> "CharField".

(func: &Expression)

Source from the content-addressed store, hash-verified

562
563/// Last dotted segment of a call target: `Column` -> "Column", `models.CharField` -> "CharField".
564fn call_leaf(func: &Expression) -> Option<String> {
565 match func {
566 Expression::Name(NameExpression { id, .. }) => Some(id.to_string()),
567 Expression::Attribute(AttributeExpression { attr, .. }) => Some(attr.as_str().to_string()),
568 _ => None,
569 }
570}
571
572/// Leading dotted segment: `models.CharField` -> "models", bare `Column` -> None.
573fn call_module(func: &Expression) -> Option<String> {

Callers 2

analyze_callFunction · 0.85
sqlalchemy_typeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected