Skip to content

Commit d44263a

Browse files
committed
Fixed a filter() mistake.
1 parent a518ffc commit d44263a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

utils/build_swift/argparse/types.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ def __init__(self):
175175

176176
def __call__(self, value):
177177
matches = super(ClangVersionType, self).__call__(value)
178-
components = filter(None, matches.group(1, 2, 3, 5))
178+
components = filter(lambda x: x is not None, matches.group(1, 2, 3, 5))
179179

180180
return CompilerVersion(components)
181181

@@ -195,7 +195,7 @@ def __init__(self):
195195

196196
def __call__(self, value):
197197
matches = super(SwiftVersionType, self).__call__(value)
198-
components = filter(None, matches.group(1, 2, 4))
198+
components = filter(lambda x: x is not None, matches.group(1, 2, 4))
199199

200200
return CompilerVersion(components)
201201

0 commit comments

Comments
 (0)