Skip to content

Commit

Permalink
Simplify code with a set comprehension. (#183)
Browse files Browse the repository at this point in the history
  • Loading branch information
cclauss committed Aug 29, 2022
1 parent 3d7aec1 commit 2b33be1
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions distlib/markers.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,7 @@ def _is_literal(o):
return o[0] in '\'"'

def _get_versions(s):
result = []
for m in _VERSION_PATTERN.finditer(s):
result.append(NV(m.groups()[0]))
return set(result)
return {NV(m.groups()[0]) for m in _VERSION_PATTERN.finditer(s)}

class Evaluator(object):
"""
Expand Down

0 comments on commit 2b33be1

Please sign in to comment.