X7ROOT File Manager
Current Path:
/opt/hc_python/lib/python3.12/site-packages/pre_commit/commands
opt
/
hc_python
/
lib
/
python3.12
/
site-packages
/
pre_commit
/
commands
/
??
..
??
__init__.py
(0 B)
??
__pycache__
??
autoupdate.py
(6.99 KB)
??
clean.py
(429 B)
??
gc.py
(2.97 KB)
??
hazmat.py
(2.51 KB)
??
hook_impl.py
(9.2 KB)
??
init_templatedir.py
(1.11 KB)
??
install_uninstall.py
(5.22 KB)
??
migrate_config.py
(4.07 KB)
??
run.py
(13.83 KB)
??
sample_config.py
(453 B)
??
try_repo.py
(2.52 KB)
??
validate_config.py
(371 B)
??
validate_manifest.py
(377 B)
Editing: clean.py
from __future__ import annotations import os.path from pre_commit import output from pre_commit.store import Store from pre_commit.util import rmtree def clean(store: Store) -> int: legacy_path = os.path.expanduser('~/.pre-commit') for directory in (store.directory, legacy_path): if os.path.exists(directory): rmtree(directory) output.write_line(f'Cleaned {directory}.') return 0
Upload File
Create Folder