Skip to content

Commit c49a325

Browse files
committed
Extra lint
1 parent bbc742d commit c49a325

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

versioneer.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -606,11 +606,11 @@ def git_versions_from_keywords(keywords, tag_prefix, verbose):
606606
if verbose:
607607
print("keywords are unexpanded, not using")
608608
raise NotThisMethod("unexpanded keywords, not a git-archive tarball")
609-
refs = set(r.strip() for r in refnames.strip("()").split(","))
609+
refs = {r.strip() for r in refnames.strip("()").split(",")}
610610
# starting in git-1.8.3, tags are listed as "tag: foo-1.0" instead of
611611
# just "foo-1.0". If we see a "tag: " prefix, prefer those.
612612
TAG = "tag: "
613-
tags = set(r[len(TAG):] for r in refs if r.startswith(TAG))
613+
tags = {r[len(TAG):] for r in refs if r.startswith(TAG)}
614614
if not tags:
615615
# Either we're using git < 1.8.3, or there really are no tags. We use
616616
# a heuristic: assume all version tags have a digit. The old git %%d
@@ -619,7 +619,7 @@ def git_versions_from_keywords(keywords, tag_prefix, verbose):
619619
# between branches and tags. By ignoring refnames without digits, we
620620
# filter out many common branch names like "release" and
621621
# "stabilization", as well as "HEAD" and "master".
622-
tags = set(r for r in refs if re.search(r'\d', r))
622+
tags = {r for r in refs if re.search(r'\d', r)}
623623
if verbose:
624624
print("discarding '%%s', no digits" %% ",".join(refs-tags))
625625
if verbose:
@@ -960,11 +960,11 @@ def git_versions_from_keywords(keywords, tag_prefix, verbose):
960960
if verbose:
961961
print("keywords are unexpanded, not using")
962962
raise NotThisMethod("unexpanded keywords, not a git-archive tarball")
963-
refs = set(r.strip() for r in refnames.strip("()").split(","))
963+
refs = {r.strip() for r in refnames.strip("()").split(",")}
964964
# starting in git-1.8.3, tags are listed as "tag: foo-1.0" instead of
965965
# just "foo-1.0". If we see a "tag: " prefix, prefer those.
966966
TAG = "tag: "
967-
tags = set(r[len(TAG):] for r in refs if r.startswith(TAG))
967+
tags = {r[len(TAG):] for r in refs if r.startswith(TAG)}
968968
if not tags:
969969
# Either we're using git < 1.8.3, or there really are no tags. We use
970970
# a heuristic: assume all version tags have a digit. The old git %d
@@ -973,7 +973,7 @@ def git_versions_from_keywords(keywords, tag_prefix, verbose):
973973
# between branches and tags. By ignoring refnames without digits, we
974974
# filter out many common branch names like "release" and
975975
# "stabilization", as well as "HEAD" and "master".
976-
tags = set(r for r in refs if re.search(r'\d', r))
976+
tags = {r for r in refs if re.search(r'\d', r)}
977977
if verbose:
978978
print("discarding '%s', no digits" % ",".join(refs-tags))
979979
if verbose:

0 commit comments

Comments
 (0)