o
    bf                     @   sj  U d Z ddlmZmZ ddlmZ ddlmZmZ ddl	m
Z
 G dd deZG dd	 d	eZejejhejejejhejejejhejejejejhejejejejejejejhejejejejejejejhejejejejejejejejejhejejejejejejejejejejh	iZeeee f e d
< dee dede!fddZ"eG dd dZ#dS )zData structures configuring Black behavior.

Mostly around Python language feature support per version and Black configuration
chosen by the user.
    )	dataclassfield)Enum)DictSet)DEFAULT_LINE_LENGTHc                   @   s:   e Zd ZdZdZdZdZdZdZdZ	dZ
d	efd
dZdS )TargetVersion                     	   returnc                 C   s
   | t ju S N)r   PY27)self r   I/var/www/secure340b-portal/env/lib/python3.10/site-packages/black/mode.py
is_python2   s   
zTargetVersion.is_python2N)__name__
__module____qualname__r   PY33PY34PY35PY36PY37PY38PY39boolr   r   r   r   r   r      s    r   c                   @   s8   e Zd ZdZdZdZdZdZdZdZ	dZ
d	Zd
ZdZdS )Feature   r	   r
   r   r   r   r   r   r   
   2   N)r   r   r   UNICODE_LITERALS	F_STRINGSNUMERIC_UNDERSCORESTRAILING_COMMA_IN_CALLTRAILING_COMMA_IN_DEFASYNC_IDENTIFIERSASYNC_KEYWORDSASSIGNMENT_EXPRESSIONSPOS_ONLY_ARGUMENTSRELAXED_DECORATORSZFORCE_OPTIONAL_PARENTHESESr   r   r   r   r#      s    r#   VERSION_TO_FEATUREStarget_versionsfeaturer   c                    s   t  fdd| D S )Nc                 3   s    | ]	} t | v V  qd S r   )r1   .0versionr3   r   r   	<genexpr>_   s    z#supports_feature.<locals>.<genexpr>)all)r2   r3   r   r7   r   supports_feature^   s   r:   c                   @   sz   e Zd ZU eedZee ed< e	Z
eed< dZeed< dZeed< dZeed< dZeed	< dZeed
< defddZdS )Mode)default_factoryr2   line_lengthTstring_normalizationFis_pyiis_ipynbmagic_trailing_commaexperimental_string_processingr   c              	   C   s   | j rddd t| j dd dD }nd}|t| jtt| jtt| jtt| jtt| j	tt| j
g}d|S )	N,c                 s   s    | ]}t |jV  qd S r   )strvaluer4   r   r   r   r8   n   s
    
z%Mode.get_cache_key.<locals>.<genexpr>c                 S   s   | j S r   )rE   )vr   r   r   <lambda>p   s    z$Mode.get_cache_key.<locals>.<lambda>)key-.)r2   joinsortedrD   r=   intr>   r?   r@   rA   rB   )r   version_strpartsr   r   r   get_cache_keyl   s   


	zMode.get_cache_keyN)r   r   r   r   setr2   r   r   __annotations__r   r=   rM   r>   r"   r?   r@   rA   rB   rD   rP   r   r   r   r   r;   b   s   
 r;   N)$__doc__dataclassesr   r   enumr   typingr   r   Zblack.constr   r   r#   r   r,   r   r'   r   r   r*   r   r(   r)   r+   r   r-   r    r.   r/   r!   r0   r1   rR   r"   r:   r;   r   r   r   r   <module>   sp    

1