mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 08:14:42 +04:00
Remove plumbum
This commit is contained in:
parent
5d9ba14841
commit
bbd2572b11
24 changed files with 236 additions and 203 deletions
|
|
@ -5,7 +5,9 @@ import os
|
|||
import os.path
|
||||
import pytest
|
||||
import shutil
|
||||
from plumbum import local
|
||||
|
||||
from pre_commit.util import cmd_output
|
||||
from pre_commit.util import cwd
|
||||
|
||||
|
||||
TESTING_DIR = os.path.abspath(os.path.dirname(__file__))
|
||||
|
|
@ -34,8 +36,8 @@ def copy_tree_to_path(src_dir, dest_dir):
|
|||
|
||||
|
||||
def get_head_sha(dir):
|
||||
with local.cwd(dir):
|
||||
return local['git']('rev-parse', 'HEAD').strip()
|
||||
with cwd(dir):
|
||||
return cmd_output('git', 'rev-parse', 'HEAD')[1].strip()
|
||||
|
||||
|
||||
def is_valid_according_to_schema(obj, schema):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue