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

Method as_function

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

Source from the content-addressed store, hash-verified

413 }
414
415 pub fn as_function(&self) -> Option<&AstNodeRef<ast::StmtFunctionDef>> {
416 match self {
417 Self::Function(function) => Some(function),
418 _ => None,
419 }
420 }
421
422 pub fn expect_function(&self) -> &AstNodeRef<ast::StmtFunctionDef> {
423 self.as_function().expect("expected function")

Callers 15

function_scopeMethod · 0.80
attribute_scopesFunction · 0.80
expect_functionMethod · 0.80
is_bound_parameterMethod · 0.80
is_in_no_type_checkMethod · 0.80
unused_bindingsFunction · 0.80
receiver_method_scopeMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected