Skip to content

Commit

Permalink
Improving performance for array slice (#555)
Browse files Browse the repository at this point in the history
* Addressing issue 552:
#552

Improving performance for array slice

* Removing unused import
  • Loading branch information
QSilver committed May 24, 2022
1 parent e8426a4 commit 3da8d7f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions detect_secrets/util/code_snippet.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import itertools
from typing import Generator
from typing import List

Expand Down Expand Up @@ -27,7 +26,7 @@ def get_code_snippet(
target_line_index = lines_of_context

return CodeSnippet(
snippet=list(itertools.islice(lines, start_line_index, end_line_index)),
snippet=lines[start_line_index:end_line_index],
start_line=start_line_index,
target_index=target_line_index,
)
Expand Down

0 comments on commit 3da8d7f

Please sign in to comment.