MCPcopy Index your code
hub / github.com/pre-commit/pre-commit / mark_config_used

Method mark_config_used

pre_commit/store.py:225–235  ·  view source on GitHub ↗
(self, path: str)

Source from the content-addressed store, hash-verified

223 )
224
225 def mark_config_used(self, path: str) -> None:
226 if self.readonly: # pragma: win32 no cover
227 return
228 path = os.path.realpath(path)
229 # don't insert config files that do not exist
230 if not os.path.exists(path):
231 return
232 with self.connect() as db:
233 # TODO: eventually remove this and only create in _create
234 self._create_configs_table(db)
235 db.execute('INSERT OR IGNORE INTO configs VALUES (?)', (path,))

Calls 3

connectMethod · 0.95
_create_configs_tableMethod · 0.95
existsMethod · 0.80