Return True if ``obj`` is a sequence that isn't a string.
(obj)
| 21 | |
| 22 | |
| 23 | def is_sequence_but_not_string(obj) -> typing.TypeGuard[Sequence]: |
| 24 | """Return True if ``obj`` is a sequence that isn't a string.""" |
| 25 | return isinstance(obj, Sequence) and not isinstance(obj, (str, bytes)) |
| 26 | |
| 27 | |
| 28 | def is_collection(obj) -> typing.TypeGuard[typing.Iterable]: |
no outgoing calls
no test coverage detected
searching dependent graphs…