MCPcopy
hub / github.com/treeverse/dvc / _OpenContextManager

Class _OpenContextManager

dvc/api/data.py:93–99  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

91
92
93class _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
102def open( # noqa: A001

Callers 1

openFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected