MCPcopy Create free account
hub / github.com/PyTables/PyTables / close_all

Method close_all

tables/file.py:126–131  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

124 return self._name_mapping[filename]
125
126 def close_all(self) -> None:
127 handlers = list(self._handlers) # make a copy
128 for fileh in handlers:
129 msg = f"Closing remaining open file: {fileh.filename}"
130 warnings.warn(UnclosedFileWarning(msg))
131 fileh.close()
132
133
134# Dict of opened files (keys are filenames and values filehandlers)

Callers

nothing calls this directly

Calls 2

UnclosedFileWarningClass · 0.85
closeMethod · 0.45

Tested by

no test coverage detected