@@ -1692,9 +1692,9 @@ def _check_invalid_sequence_index(self, subscript: nodes.Subscript) -> None:
1692
1692
# Determine what method on the parent this index will use
1693
1693
# The parent of this node will be a Subscript, and the parent of that
1694
1694
# node determines if the Subscript is a get, set, or delete operation.
1695
- if subscript .ctx is astroid .Store :
1695
+ if subscript .ctx is astroid .Context . Store :
1696
1696
methodname = "__setitem__"
1697
- elif subscript .ctx is astroid .Del :
1697
+ elif subscript .ctx is astroid .Context . Del :
1698
1698
methodname = "__delitem__"
1699
1699
else :
1700
1700
methodname = "__getitem__"
@@ -2116,13 +2116,13 @@ def visit_subscript(self, node: nodes.Subscript) -> None:
2116
2116
confidence = INFERENCE ,
2117
2117
)
2118
2118
2119
- if node .ctx == astroid .Load :
2119
+ if node .ctx == astroid .Context . Load :
2120
2120
supported_protocol = supports_getitem
2121
2121
msg = "unsubscriptable-object"
2122
- elif node .ctx == astroid .Store :
2122
+ elif node .ctx == astroid .Context . Store :
2123
2123
supported_protocol = supports_setitem
2124
2124
msg = "unsupported-assignment-operation"
2125
- elif node .ctx == astroid .Del :
2125
+ elif node .ctx == astroid .Context . Del :
2126
2126
supported_protocol = supports_delitem
2127
2127
msg = "unsupported-delete-operation"
2128
2128
0 commit comments