Skip to content

Commit

Permalink
Merge pull request #1494 from j-t-1/enumerate
Browse files Browse the repository at this point in the history
Use enumerate for readability
  • Loading branch information
ikelos authored Dec 30, 2024
2 parents cea6f10 + 52a643d commit eccaa57
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions volatility3/framework/renderers/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,7 @@ def _validate_values(self, values: List[interfaces.renderers.BaseTypes]) -> None
raise TypeError(
"Values must be a list of objects made up of simple types and number the same as the columns"
)
for index in range(len(self._treegrid.columns)):
column = self._treegrid.columns[index]
for index, column in enumerate(self._treegrid.columns):
val = values[index]
if not isinstance(val, (column.type, interfaces.renderers.BaseAbsentValue)):
raise TypeError(
Expand Down Expand Up @@ -413,8 +412,7 @@ def __init__(
_index = None
self._type = None
self.ascending = ascending
for i in range(len(treegrid.columns)):
column = treegrid.columns[i]
for i, column in enumerate(treegrid.columns):
if column.name.lower() == column_name.lower():
_index = i
self._type = column.type
Expand Down

0 comments on commit eccaa57

Please sign in to comment.