mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 08:14:42 +04:00
Move commands into their own files.
This commit is contained in:
parent
111ed02938
commit
cdfd3f7670
16 changed files with 736 additions and 673 deletions
12
pre_commit/commands/clean.py
Normal file
12
pre_commit/commands/clean.py
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
from __future__ import print_function
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import os.path
|
||||
import shutil
|
||||
|
||||
|
||||
def clean(runner):
|
||||
if os.path.exists(runner.store.directory):
|
||||
shutil.rmtree(runner.store.directory)
|
||||
print('Cleaned {0}.'.format(runner.store.directory))
|
||||
return 0
|
||||
Loading…
Add table
Add a link
Reference in a new issue