Skip to content

Commit

Permalink
Optimize by removing redundant list call (microsoft#602)
Browse files Browse the repository at this point in the history
Avoid double iteration by removing `list` call on a `list` object.
  • Loading branch information
sayandipdutta committed Feb 25, 2022
1 parent f9938a2 commit 500ce65
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Build/check_indents.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def check_file(filename : str) -> bool:
found_tabs = False

with open(filename, 'r') as f:
contents = list(f.readlines())
contents = f.readlines()

for line in contents:
# Find the leading whitespace.
Expand Down

0 comments on commit 500ce65

Please sign in to comment.