Skip to content

Commit b960e29

Browse files
author
punkadiddle
committed
tags_to_version loops reduced to map function
1 parent 0a2a855 commit b960e29

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

src/setuptools_scm/version.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -111,12 +111,7 @@ def tags_to_versions(tags, config=None):
111111
:param tags: an iterable of tags
112112
:param config: optional configuration object
113113
"""
114-
result = []
115-
for tag in tags:
116-
version = tag_to_version(tag, config)
117-
if version is not None:
118-
result.append(version)
119-
return result
114+
return filter(None, map(lambda tag: tag_to_version(tag, config=config), tags))
120115

121116

122117
class ScmVersion(object):

0 commit comments

Comments
 (0)