$q;
d Z ddlZddlZddlmZ ddlmZmZ ddlm Z m
Z
mZ dee defdZ
dee dee fd Z dded
edededeee defdZdS )zDefines a git hook to allow pre-commit warnings and errors about import order.
usage:
exit_code = git_hook(strict=True|False, modify=True|False)
N)Path)ListOptional)Configapi
exceptionscommandreturnc v t j | t j d }|j S )zRun a command and return raw output
:param str command: the command to run
:returns: the stdout output of the command
T)stdoutcheck)
subprocessrunPIPEr decode)r results ]/builddir/build/BUILD/cloudlinux-venv-1.0.10/venv/lib/python3.11/site-packages/isort/hooks.py
get_outputr s0 ^GJO4
H
H
HF=!!! c \ t | }d | D S )zRun a command and return lines of output
:param str command: the command to run
:returns: list of whitespace-stripped lines output by command
c 6 g | ]}| S )strip).0lines r