MCPcopy Index your code
hub / github.com/pydata/xarray / __del__

Method __del__

xarray/backends/file_manager.py:410–420  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

408 self._kwargs = {}
409
410 def __del__(self) -> None:
411 if not self._closed:
412 self.close()
413
414 if OPTIONS["warn_for_unclosed_files"]:
415 warnings.warn(
416 f"deallocating {self}, but file is not already closed. "
417 "This may indicate a bug.",
418 RuntimeWarning,
419 stacklevel=2,
420 )
421
422 def __getstate__(self):
423 # file is intentionally omitted: we want to open it again

Callers

nothing calls this directly

Calls 1

closeMethod · 0.95

Tested by

no test coverage detected