Last dotted segment of a call target: `Column` -> "Column", `models.CharField` -> "CharField".
(func: &Expression)
| 562 | |
| 563 | /// Last dotted segment of a call target: `Column` -> "Column", `models.CharField` -> "CharField". |
| 564 | fn 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. |
| 573 | fn call_module(func: &Expression) -> Option<String> { |
no outgoing calls
no test coverage detected