From 3a779a237e24e2ad755cce33a8f4ec1fe9dd030d Mon Sep 17 00:00:00 2001 From: Brent Westbrook Date: Thu, 2 Oct 2025 08:59:28 -0400 Subject: [PATCH] add PEP 765 to B012 docs --- .../rules/flake8_bugbear/rules/jump_statement_in_finally.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/crates/ruff_linter/src/rules/flake8_bugbear/rules/jump_statement_in_finally.rs b/crates/ruff_linter/src/rules/flake8_bugbear/rules/jump_statement_in_finally.rs index 87fc151c90..5350f9888e 100644 --- a/crates/ruff_linter/src/rules/flake8_bugbear/rules/jump_statement_in_finally.rs +++ b/crates/ruff_linter/src/rules/flake8_bugbear/rules/jump_statement_in_finally.rs @@ -18,6 +18,9 @@ use crate::checkers::ast::Checker; /// `break`, `continue`, or `return` statement is reached in a `finally` block, /// any exception raised in the `try` or `except` blocks will be silenced. /// +/// [PEP 765](https://peps.python.org/pep-0765/) additionally made this a `SyntaxWarning` starting +/// in Python 3.14. It may become a `SyntaxError` in the future. +/// /// ## Example /// ```python /// def speed(distance, time):