Skip to content

Commit 2193c25

Browse files
authored
Merge pull request #58716 from edymtt/abc-iterable-instead-of-iterable
Use `collections.abc.Iterable` instead of `collection.Iterable`
2 parents bf3eec4 + ed69624 commit 2193c25

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

utils/build_swift/build_swift/shell.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ def quote(command):
206206
if isinstance(command, (str,)):
207207
return _quote(command)
208208

209-
if isinstance(command, collections.Iterable):
209+
if isinstance(command, collections.abc.Iterable):
210210
return ' '.join([_quote(arg) for arg in _normalize_args(command)])
211211

212212
raise ValueError('Invalid command type: {}'.format(type(command).__name__))

utils/build_swift/tests/build_swift/test_shell.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ def duplicate(x):
6565

6666
result = shell._flatmap(duplicate, [1, 2, 3])
6767

68-
self.assertIsInstance(result, collections.Iterable)
68+
self.assertIsInstance(result, collections.abc.Iterable)
6969
self.assertEqual(list(result), [1, 1, 2, 2, 3, 3])
7070

7171
# -------------------------------------------------------------------------

0 commit comments

Comments
 (0)