Files
Aleksandr.Govenko c02ef9f62d PY-78964 Incorrect return type warning when using try...finally
Added a new CFG instruction to indicate implicit raise after finally block. Also added PyDataFlow as an future entry point for DFA.


Merge-request: IJ-MR-155798
Merged-by: Aleksandr Govenko <aleksandr.govenko@jetbrains.com>

(cherry picked from commit db63ba632c48235cc51b8e64869d21f5bcfc2d1c)

IJ-MR-155798

GitOrigin-RevId: b913e67a07e035b03f1092d5b6d9529864cb4d1b
2025-03-07 16:41:12 +00:00

37 lines
1.2 KiB
Plaintext

0(1) element: null
1(2) element: PyAssignmentStatement
2(3) READ ACCESS: None
3(4) WRITE ACCESS: status
4(5) element: PyTryExceptStatement
5(6,10) element: PyTryPart
6(7,10) element: PyAssignmentStatement
7(8,10) READ ACCESS: open
8(9,10) element: PyCallExpression: open
9(10,22) WRITE ACCESS: status
10(11) element: PyFinallyPart
11(12) element: PyIfStatement
12(13) READ ACCESS: status
13(14,16) READ ACCESS: None
14(15) element: null. Condition: status is not None:false
15(21) ASSERTTYPE ACCESS: status
16(17) element: null. Condition: status is not None:true
17(18) ASSERTTYPE ACCESS: status
18(19) element: PyStatementList
19(20) element: PyPrintStatement
20(21) READ ACCESS: status
21(36) finally fail exit
22(23) element: PyFinallyPart
23(24) element: PyIfStatement
24(25) READ ACCESS: status
25(26,28) READ ACCESS: None
26(27) element: null. Condition: status is not None:false
27(33) ASSERTTYPE ACCESS: status
28(29) element: null. Condition: status is not None:true
29(30) ASSERTTYPE ACCESS: status
30(31) element: PyStatementList
31(32) element: PyPrintStatement
32(33) READ ACCESS: status
33(34) element: PyExpressionStatement
34(35) READ ACCESS: status
35(36) element: PyCallExpression: status.close
36() element: null