BLOCKER

python/return-in-finally

`return`, `break` or `continue` inside `finally`. It discards any exception raised in the `try`/`except`, so `charge()` raising `PaymentDeclined` still returns `{"ok": True}`. `finally` releases resources; move the jump out.

Decided by
review judgement
Severity means
must not merge. The output contract
Applies to
**/*.py
Reaches
1 profile: service-python
Defined in
standards/stacks/python.md:17

Read it in the terminal

The same facts, from the checkout you are already in — no browser, and no network.

terminal
$ npx redlinegate explain python/return-in-finally

Where this came from

You are most likely here from a review comment. A finding names its rule and, when your repository has told Redline where the standard is published, its address:

on the pull request
Redline/BLOCKER [python/return-in-finally]: …
  → …/r/python/return-in-finally

That second line is written by redline init --docs-url and is empty until an organisation sets one — there is no default, because a link to somebody else's copy of the standard is worse than no link. See Onboard a repository.

In context

The Python standard lists this rule with the rest of its stack, in the file a reviewer and an AI assistant both read.

Other BLOCKER rules in this stack