From 675b112a1657763eeb3c34bacca2fe8d200ee80d Mon Sep 17 00:00:00 2001 From: Yuyao Huang Date: Tue, 23 Apr 2024 22:12:00 +0800 Subject: [PATCH] Index(); withitem() --- trace_commentor/flags.py | 2 +- trace_commentor/handlers/__init__.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/trace_commentor/flags.py b/trace_commentor/flags.py index 783d7ea..d1fc98b 100644 --- a/trace_commentor/flags.py +++ b/trace_commentor/flags.py @@ -30,5 +30,5 @@ HANDLER_FREE_NODES = [ ast.Add, ast.Sub, ast.Mult, ast.Div, ast.FloorDiv, ast.Mod, ast.LShift, ast.RShift, ast.BitOr, ast.BitXor, ast.BitAnd, ast.MatMult, ast.Eq, ast.NotEq, ast.Lt, ast.LtE, ast.Gt, ast.GtE, ast.Is, ast.IsNot, ast.In, ast.NotIn, ast.Load, ast.Store, - ast.arg, ast.arguments, ast.keyword, + ast.arg, ast.arguments, ast.keyword, ast.withitem, ] diff --git a/trace_commentor/handlers/__init__.py b/trace_commentor/handlers/__init__.py index b78732b..ebe60e4 100644 --- a/trace_commentor/handlers/__init__.py +++ b/trace_commentor/handlers/__init__.py @@ -1,6 +1,6 @@ from .definitions import FunctionDef, Return, Lambda from .statements import Pass, Assign, AnnAssign, AugAssign -from .expressions import Expr, UnaryOp, BinOp, Call, Compare, Attribute, Subscript, Slice, keyword, IfExp +from .expressions import Expr, UnaryOp, BinOp, Call, Compare, Attribute, Subscript, Slice, keyword, IfExp, Index from .literals import Constant, Tuple, List, Set, Dict, FormattedValue, JoinedStr from .variables import Name from .control_flow import If, For, Continue, Break, With, Raise