MCPcopy
hub / github.com/python/mypy / end_branch_statement

Method end_branch_statement

mypy/partially_defined.py:246–249  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

244 self._scope().branch_stmts[-1].next_branch()
245
246 def end_branch_statement(self) -> None:
247 assert len(self._scope().branch_stmts) > 1
248 result = self._scope().branch_stmts.pop().done()
249 self._scope().branch_stmts[-1].record_nested_branch(result)
250
251 def skip_branch(self) -> None:
252 # Only skip branch if we're outside of "root" branch statement.

Callers 5

visit_if_stmtMethod · 0.80
visit_match_stmtMethod · 0.80
visit_for_stmtMethod · 0.80
process_try_stmtMethod · 0.80
visit_while_stmtMethod · 0.80

Calls 5

_scopeMethod · 0.95
lenFunction · 0.85
doneMethod · 0.80
record_nested_branchMethod · 0.80
popMethod · 0.45

Tested by

no test coverage detected