MCPcopy Create free account
hub / github.com/python/mypy / _db_for

Method _db_for

mypy/metastore.py:208–211  ·  view source on GitHub ↗
(self, name: str)

Source from the content-addressed store, hash-verified

206 return hash_path_stem(name) % self.num_shards
207
208 def _db_for(self, name: str) -> sqlite3.Connection:
209 if not self.dbs:
210 raise FileNotFoundError()
211 return self.dbs[self._shard_index(name)]
212
213 def _query(self, name: str, field: str) -> Any:
214 # Raises FileNotFound for consistency with the file system version

Callers 3

_queryMethod · 0.95
writeMethod · 0.95
removeMethod · 0.95

Calls 1

_shard_indexMethod · 0.95

Tested by

no test coverage detected