Method: pylint.checkers.utils.is_iterable
Calls: 859, Exceptions: 0, Paths: 2Back
Path 1: 852 calls (0.99)
Instance (347) List (167) Tuple (127) DictItems (53) Const (40) Dict (40) Set (22) DictKeys (20) ClassDef (16) DictValues (6)
False (852)
True (798) False (54)
1def is_iterable(value: nodes.NodeNG, check_async: bool = False) -> bool:
2 if check_async:
3 protocol_check = _supports_async_iteration_protocol
4 else:
5 protocol_check = _supports_iteration_protocol
6 return _supports_protocol(value, protocol_check)
Path 2: 7 calls (0.01)
AsyncGenerator (5) Instance (2)
True (7)
True (7)
1def is_iterable(value: nodes.NodeNG, check_async: bool = False) -> bool:
2 if check_async:
3 protocol_check = _supports_async_iteration_protocol
4 else:
5 protocol_check = _supports_iteration_protocol
6 return _supports_protocol(value, protocol_check)