(cls, file_obj, /, key=None)
| 80 | |
| 81 | @classmethod |
| 82 | def from_file(cls, file_obj, /, key=None): |
| 83 | obj = super().__new__(cls) |
| 84 | obj._key = key |
| 85 | obj._file_path = None |
| 86 | obj._load_file(file_obj) |
| 87 | obj._file_repr = repr(file_obj) |
| 88 | |
| 89 | # Disable pickling for objects created from files |
| 90 | obj.__reduce__ = obj._file_reduce |
| 91 | |
| 92 | return obj |
| 93 | |
| 94 | @classmethod |
| 95 | def clear_cache(cls, *, only_keys=None): |
nothing calls this directly
no test coverage detected