Skip to content

Commit 691ddd2

Browse files
brettlangdonaniszoubiramar
authored andcommitted
chore: treat PEP 765 warnings as errors (#15325)
## Description PEP 765 returns in finally statements is a SyntaxWarning in 3.14, and will turn into exceptions in 3.15 ## Testing <!-- Describe your testing strategy or note what tests are included --> ## Risks <!-- Note any risks associated with this change, or "None" if no risks --> ## Additional Notes <!-- Any other information that would be helpful for reviewers -->
1 parent 668e39c commit 691ddd2

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

.sg/rules/pep765-control-flow-in-finally.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
id: pep765-control-flow-in-finally
22
message: Control flow statement in finally block (PEP 765)
3-
severity: warning
3+
severity: error
44
language: python
55
rule:
66
any:

ddtrace/contrib/internal/openai/patch.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ async def _trace_and_await():
350350
g.send((resp, err))
351351
except StopIteration as e:
352352
if err is None:
353-
return e.value
353+
resp = e.value
354354
return resp
355355

356356
return _trace_and_await().__await__()

0 commit comments

Comments
 (0)