current_stage()
Return the stage of the innermost open with Stage(...) block.
Usage
current_stage()Use it inside a reusable helper that operates on whichever stage is active, so callers need not pass the stage explicitly. Returns None outside any stage block, including during the discovery pass.
Returns
Stage | None-
The active stage, or
Nonewhen no stage block is open.