File tree 2 files changed +6
-9
lines changed
2 files changed +6
-9
lines changed Original file line number Diff line number Diff line change @@ -118,8 +118,6 @@ def assert_num_changes(
118
118
assert len (changes [0 ].changes ) == expected_num_changes
119
119
actual_num = len (changes [0 ].changes )
120
120
121
- # actual_num = len(changes)
122
-
123
121
if min_num_changes is not None :
124
122
assert (
125
123
actual_num >= min_num_changes
Original file line number Diff line number Diff line change @@ -27,13 +27,12 @@ def leave_Decorator(
27
27
):
28
28
return updated_node
29
29
# Due to semgrep's odd way of reporting the position for this (decorators + functiondef), we match by line only
30
- if self .node_is_selected_by_line_only (original_node ):
31
- if (
32
- self .find_base_name (original_node .decorator )
33
- == "django.views.decorators.csrf.csrf_exempt"
34
- ):
35
- self .report_change (original_node )
36
- return cst .RemovalSentinel .REMOVE
30
+ if self .node_is_selected_by_line_only (original_node ) and (
31
+ self .find_base_name (original_node .decorator )
32
+ == "django.views.decorators.csrf.csrf_exempt"
33
+ ):
34
+ self .report_change (original_node )
35
+ return cst .RemovalSentinel .REMOVE
37
36
return updated_node
38
37
39
38
You can’t perform that action at this time.
0 commit comments