MCPcopy
hub / github.com/protomaps/PMTiles / __enter__

Method __enter__

python/rio-pmtiles/tests/test_cli.py:22–23  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

20 self.file = open(fname, 'rb')
21
22 def __enter__(self):
23 return Reader(MmapSource(self.file))
24
25 def __exit__(self, exc_type, exc_val, exc_tb):
26 self.file.close()

Callers

nothing calls this directly

Calls 2

ReaderClass · 0.90
MmapSourceFunction · 0.90

Tested by

no test coverage detected