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

Method expect_function

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

Source from the content-addressed store, hash-verified

432 }
433
434 pub fn expect_function(&self) -> &AstNodeRef<ast::StmtFunctionDef> {
435 self.as_function().expect("expected function")
436 }
437
438 fn as_type_alias(&self) -> Option<&AstNodeRef<ast::StmtTypeAlias>> {
439 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