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

Method expect_function

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

Source from the content-addressed store, hash-verified

418 }
419
420 pub fn expect_function(&self) -> &AstNodeRef<ast::StmtFunctionDef> {
421 self.as_function().expect("expected function")
422 }
423
424 pub fn as_type_alias(&self) -> Option<&AstNodeRef<ast::StmtTypeAlias>> {
425 match self {

Callers 7

in_async_contextMethod · 0.80
nodeMethod · 0.80
focus_rangeMethod · 0.80
definitionMethod · 0.80
previous_overloadMethod · 0.80
signatureMethod · 0.80
raw_signatureMethod · 0.80

Calls 2

expectMethod · 0.80
as_functionMethod · 0.80

Tested by

no test coverage detected