Skip to content

Commit

Permalink
Merge pull request #46 from DimitriPapadopoulos/fix_deepsource.io_issues
Browse files Browse the repository at this point in the history
Use `any` instead of loop
  • Loading branch information
jbweston authored Sep 21, 2022
2 parents ed8fbf3 + 6dd098d commit b83c328
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions miniver/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,7 @@ def _line_in_file(to_find, filename):
assert "\n" not in to_find
try:
with open(filename) as f:
for line in f:
if to_find in line:
return True
return False
return any(to_find in line for line in f)
except FileNotFoundError:
return False

Expand Down

0 comments on commit b83c328

Please sign in to comment.