| 91 | |
| 92 | |
| 93 | class _OpenContextManager(GCM): |
| 94 | def __init__(self, func, args, kwds): |
| 95 | self.gen = func(*args, **kwds) |
| 96 | self.func, self.args, self.kwds = (func, args, kwds) # type: ignore[assignment] |
| 97 | |
| 98 | def __getattr__(self, name): |
| 99 | raise AttributeError("dvc.api.open() should be used in a with statement.") |
| 100 | |
| 101 | |
| 102 | def open( # noqa: A001 |