관리-도구
편집 파일: xargs.cpython-38.pyc
U ,�e� � @ sr d dl mZ d dlZd dlZd dlZd dlZd dlZd dlZd dl Z d dl mZ d dl mZ d dl m Z d dl mZ d dl mZ d dl mZ d d l mZ d d lmZ d dlmZ d dlmZ ed �Zed�Zdd�dd�Zd3ddd�dd�Zdd�dd�Zddd�dd�ZG dd� de�Zd4dddd d!d"�d#d$�Zej dd%d&�d'd(��Z!d)d*e� d+�d,dd-ddd.d/d0�d1d2�Z"dS )5� )�annotationsN)�Any)�Callable)� Generator)�Iterable)�MutableMapping)�Sequence)�TypeVar)� parse_shebang)�cmd_output_b)�cmd_output_p�TArg�TRet�int)�returnc C sL zt t�d��W S tk r$ Y nX z t�� W S tk rF Y dS X d S )Nr � )�len�os�sched_getaffinity�AttributeError�multiprocessing� cpu_count�NotImplementedError� r r �>/opt/hc_python/lib/python3.8/site-packages/pre_commit/xargs.pyr s r zMutableMapping[str, str] | None)�_envr c C sT | d k r| nt tdtj�}dt|� }|�� D ] \}}|t|�t|� d 7 }q.|S )N�environb� � )�getattrr �environr �items)r r �size�k�vr r r � _environ_size) s r% c C sH t jdkr2t �d�d t� } tt| d�d�} | S t jdkr@dS dS d S )N�posix� SC_ARG_MAXi i i �nti x )r �name�sysconfr% �max�min)�maximumr r r �_get_platform_max_length1 s r. �str)�cmdr c G s<