Closed
Description
This code can probably now be removed:
# This if statement can be removed when we no longer support 3.8.
if isinstance(slice, ast.Index):
slice = slice.value # type: ignore
if not isinstance(slice, ast.Constant):
raise ValueError(
f"Slices must be indexable constants only - {ast.dump(slice)} is not "
"valid."
)
index = slice.value