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

Method current_statement_id

crates/ruff_python_semantic/src/model.rs:1519–1521  ·  view source on GitHub ↗

Return the [`NodeId`] of the current [`Stmt`], if any.

(&self)

Source from the content-addressed store, hash-verified

1517
1518 /// Return the [`NodeId`] of the current [`Stmt`], if any.
1519 pub fn current_statement_id(&self) -> Option<NodeId> {
1520 self.current_statement_ids().next()
1521 }
1522
1523 /// Return the [`NodeId`] of the current [`Stmt`] parent, if any.
1524 pub fn current_statement_parent_id(&self) -> Option<NodeId> {

Callers 8

add_diagnosticFunction · 0.80
enumerate_for_loopFunction · 0.80
docstring_in_stubsFunction · 0.80
redundant_none_literalFunction · 0.80
pass_in_class_bodyFunction · 0.80
useless_returnFunction · 0.80

Calls 2

current_statement_idsMethod · 0.80
nextMethod · 0.45

Tested by

no test coverage detected