o
    h                   $   @   s  U d Z ddlmZmZ ddlmZmZ ddlmZ ddl	m
Z
 ddlmZmZmZ ddlmZ ddlmZ G d	d
 d
eZG dd deZdejiZeed< ejejhejejhejejejh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%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*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*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*ej&ej'ej(ej+ej-ej/ej0hej1ejej$ejejej ej"ejej%ej*ej&ej'ej(ej+ej-ej/ej0ej2hi
Z3eeee f ed< dee dede4fddZ5G dd deZ6G dd de7Z8eG dd dZ9dS )zData structures configuring Black behavior.

Mostly around Python language feature support per version and Black configuration
chosen by the user.
    )	dataclassfield)Enumauto)sha256)
attrgetter)DictFinalSet)warn)DEFAULT_LINE_LENGTHc                   @   s4   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S )TargetVersion                  	   
         N)__name__
__module____qualname__PY33PY34PY35PY36PY37PY38PY39PY310PY311PY312 r%   r%   @/var/www/html/ai/venv/lib/python3.10/site-packages/black/mode.pyr      s    r   c                   @   sX   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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   r   r                     2   3   N)r   r   r   	F_STRINGSNUMERIC_UNDERSCORESTRAILING_COMMA_IN_CALLTRAILING_COMMA_IN_DEFASYNC_IDENTIFIERSASYNC_KEYWORDSASSIGNMENT_EXPRESSIONSPOS_ONLY_ARGUMENTSRELAXED_DECORATORSPATTERN_MATCHINGUNPACKING_ON_FLOWANN_ASSIGN_EXTENDED_RHSEXCEPT_STARVARIADIC_GENERICSDEBUG_F_STRINGSPARENTHESIZED_CONTEXT_MANAGERSTYPE_PARAMSFORCE_OPTIONAL_PARENTHESESFUTURE_ANNOTATIONSr%   r%   r%   r&   r'      s(    r'   annotationsFUTURE_FLAG_TO_FEATUREVERSION_TO_FEATUREStarget_versionsfeaturereturnc                    s   t  fdd| D S )Nc                 3   s    | ]	} t | v V  qd S N)rF   .0versionrH   r%   r&   	<genexpr>   s    z#supports_feature.<locals>.<genexpr>)all)rG   rH   r%   rN   r&   supports_feature   s   rQ   c                   @   s   e Zd ZdZe Ze Ze Ze Ze Z	e Z
e Ze Ze Ze Ze Ze Ze Ze Ze Ze Ze Ze Ze Ze Ze Ze Ze Ze ZdS )Previewz"Individual preview style features.N)r   r   r   __doc__r   add_trailing_comma_consistently"blank_line_after_nested_stub_class+blank_line_between_nested_and_def_stub_filehex_codes_in_unicode_sequences"improved_async_statements_handlingmultiline_string_handling$no_blank_line_before_class_docstring/prefer_splitting_right_hand_side_of_assignmentsstring_processing$parenthesize_conditional_expressionsparenthesize_long_type_hints+respect_magic_trailing_comma_in_return_type&skip_magic_trailing_comma_in_subscriptwrap_long_dict_values_in_parens(wrap_multiple_context_managers_in_parensdummy_implementationswalrus_subscriptmodule_docstring_newlinesaccept_raw_docstringsfix_power_op_line_length*hug_parens_with_braces_and_square_brackets2allow_empty_first_line_before_new_block_or_comment.single_line_format_skip_with_multiple_commentslong_case_block_line_splittingr%   r%   r%   r&   rR      s4    
rR   c                   @   s   e Zd ZdZdS )
DeprecatedzVisible deprecation warning.N)r   r   r   rS   r%   r%   r%   r&   rl      s    rl   c                   @   s   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Zeed< eedZee ed< dZeed< dddZdedefddZdefddZdS )Mode)default_factoryrG   line_lengthTstring_normalizationFis_pyiis_ipynbskip_source_first_linemagic_trailing_commaexperimental_string_processingpython_cell_magicspreviewrI   Nc                 C   s   | j r
tdt d S d S )Nzf`experimental string processing` has been included in `preview` and deprecated. Use `preview` instead.)ru   r   rl   )selfr%   r%   r&   __post_init__   s   zMode.__post_init__rH   c                 C   s   |t ju r| jp
| jS | jS )z
        Provide `Preview.FEATURE in Mode` syntax that mirrors the ``preview`` flag.

        The argument is not checked and features are not differentiated.
        They only exist to make development easier by clarifying intent.
        )rR   r\   rw   ru   )rx   rH   r%   r%   r&   __contains__   s   
zMode.__contains__c                 C   s   | j rddd t| j tddD }nd}|t| jtt| jtt| jtt| j	tt| j
tt| jtt| jtt| jtdt| j  g
}d|S )N,c                 s   s    | ]}t |jV  qd S rJ   )strvaluerK   r%   r%   r&   rO      s
    
z%Mode.get_cache_key.<locals>.<genexpr>r}   )key-.)rG   joinsortedr   r|   ro   intrp   rq   rr   rs   rt   ru   rw   r   rv   encode	hexdigest)rx   version_strpartsr%   r%   r&   get_cache_key   s"   


zMode.get_cache_key)rI   N)r   r   r   r   setrG   r
   r   __annotations__r   ro   r   rp   boolrq   rr   rs   rt   ru   rv   r|   rw   ry   rR   rz   r   r%   r%   r%   r&   rm      s   
 
rm   N):rS   dataclassesr   r   enumr   r   hashlibr   operatorr   typingr   r	   r
   warningsr   black.constr   r   r'   rC   rE   r   r   r5   r   r   r3   r   r1   r2   r4   r   r6   r    r?   r7   r8   r;   r<   r!   r9   r@   r"   r:   r#   r=   r>   r$   rA   rF   r   rQ   rR   UserWarningrl   rm   r%   r%   r%   r&   <module>   s    

g