Skip to content

Commit 59bde23

Browse files
author
cclauss
authored
Simplify with a set comprehension
1 parent 4a2d2ac commit 59bde23

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

analyse_scan_results.py

+1-5
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,8 @@ def get_repos(filename):
5656

5757

5858
def get_urls(filename):
59-
repos = set()
6059
with open(filename, 'r') as fd:
61-
for line in fd:
62-
if 'https' in line:
63-
repos.add(line)
64-
return repos
60+
return sorted({line for line in fd if 'https' in line})
6561

6662

6763
if __name__ == '__main__':

0 commit comments

Comments
 (0)