(obj)
| 344 | |
| 345 | |
| 346 | def _file_like(obj): |
| 347 | # An alternative would be:: |
| 348 | # |
| 349 | # isinstance(obj, (TextIOBase, BufferedIOBase, RawIOBase, IOBase)) |
| 350 | # |
| 351 | # but this might be more robust to file-like objects not properly |
| 352 | # inheriting from these classes: |
| 353 | return all(callable(getattr(obj, name, None)) for name in ("read", "seek")) |
| 354 | |
| 355 | |
| 356 | def _fullname(obj, *, referent=None): |
no outgoing calls
no test coverage detected