mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-04-15 01:51:46 +04:00
8 lines
263 B
Python
8 lines
263 B
Python
from pre_commit import git
|
|
from pre_commit.file_classifier.classifier import classify
|
|
|
|
|
|
def identify(args):
|
|
# TODO: more useful output
|
|
# TODO: check whether file is in git repo first?
|
|
print(classify(args.path, git.guess_git_type_for_file(args.path)))
|