MCPcopy Create free account
hub / github.com/astral-sh/ruff / as_function

Method as_function

crates/ty_python_core/src/scope.rs:427–432  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

425 }
426
427 pub fn as_function(&self) -> Option<&AstNodeRef<ast::StmtFunctionDef>> {
428 match self {
429 Self::Function(function) => Some(function),
430 _ => None,
431 }
432 }
433
434 pub fn expect_function(&self) -> &AstNodeRef<ast::StmtFunctionDef> {
435 self.as_function().expect("expected function")

Calls

no outgoing calls