%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /lib/python3/dist-packages/hyperlink/__pycache__/
Upload File :
Create Path :
Current File : //lib/python3/dist-packages/hyperlink/__pycache__/hypothesis.cpython-312.pyc

�

G�_'%����dZddlmZ	ddlZ[ddlmZddlmZm	Z	ddl
mZmZddl
mZddlmZmZmZmZmZmZmZmZdd	lmZd
dlmZmZddlmZdd
lm Z m!Z!m"Z"m#Z#m$Z$ddl%m&Z&m'Z'm(Z)dZ*ed�Z+eede+fge+fZ,	e-d�Z0da1e dd��Z2e dd��Z3e d d��Z4e d!d��Z5d�Z6da7e d��Z8e d��Z9e d��Z:y#e.$re/Z-Y�PwxYw#e;$rddlm<Z<dZ*YywxYw)"z
Hypothesis strategies.
�)�absolute_importN)�reader)�dirname�join)�
ascii_letters�digits)�
maxunicode)�Callable�Iterable�List�Optional�Sequence�Text�TypeVar�cast)�open�)�
DecodedURL�
EncodedURL)�assume)�	composite�integers�lists�sampled_from�text)�	IDNAError�check_label�encode)�decoded_urls�encoded_urls�hostname_labels�	hostnames�	idna_text�paths�port_numbers�T.c��ts�g}ttt�d�}t	|�5}td�|D�d��}t
|�|D]�}|\}}}|dk7r�|djdd�}t|�dk(r|j|d�d	�|D�\}	}
t|	|
dz�D]'}|tkDr�o|jt|���)��	d
d
d
�dj|�atS#1swY� xYw)z>
        Returns a string containing IDNA characters.
        zidna-tables-properties.csv.gzc3�>K�|]}|jd����y�w)�utf-8N)�decode)�.0�lines  �6/usr/lib/python3/dist-packages/hyperlink/hypothesis.py�	<genexpr>z"idna_characters.<locals>.<genexpr>Qs����?�d�T�[�[��)�?�s��,)�	delimiter�PVALIDr�-rc3�4K�|]}t|d����y�w)�N)�int)r+�is  r-r.z"idna_characters.<locals>.<genexpr>bs����!?��#�a��*�!?�s�N�)
�_idnaCharactersrr�__file__�	open_gzip�
csv_reader�next�split�len�append�ranger	�unichr)�result�dataFileName�dataFiler�row�codes�prop�description�startEnd�start�endr6s            r-�idna_charactersrL?s����F�
 ���!�#B��L��<�(�
1�H�#�?�h�?�!����V��!�1�C�/2�,�E�4���x�'�!�"�1�v�|�|�C��3�H��8�}��)� ������4�!?�h�!?�J�E�3�"�5�#��'�2�1���z�>�!��
�
�f�Q�i�0�1�1�

1�4"�h�h�v�.�O���9
1�
1�s�B/C<�<Dr7c
���t�}|dk\sJ�|�|dk\sJ�tt|t|||����}	t	|�|S#t
$rt
d�Y|SwxYw)a(
        A strategy which generates IDNA-encodable text.

        @param min_size: The minimum number of characters in the text.
            C{None} is treated as C{0}.

        @param max_size: The maximum number of characters in the text.
            Use C{None} for an unbounded size.
        r��min_size�max_size�alphabetF)rLrrr�idna_encoderr)�drawrOrPrQrBs     r-r#r#osy��#�$���1�}��}����q�=� �=�����x�(�X�N�O�
��	�����
���	��5�M��
�	�s�A�A#�"A#c	�R�|rd}nd}tt|t|d����S)z�
        A strategy which generates port numbers.

        @param allow_zero: Whether to allow port C{0} as a possible value.
        rri��)�	min_value�	max_value)rr5r)rS�
allow_zerorUs   r-r%r%�s*����I��I��C��h��e�L�M�N�N�c
��|r4tt|tdd����}	|jd�n9tt|t
ddtttzd	z��
���}	t|�|S#t$r[t|jd��dtd�z
kDr/|dd}t|jd��dtd�z
kDr�/Y�qwxYw#t$rtd�Y|SwxYw)z�
        A strategy which generates host name labels.

        @param allow_idn: Whether to allow non-ASCII characters as allowed by
            internationalized domain names (IDNs).
        r�?�rOrP�ascii�punycodezxn--N���r2rNF)rrr#r�UnicodeEncodeErrorr>rrrr�UnicodeErrorr)rS�	allow_idn�labels   r-r!r!�s������t�I�q�2�$F�G�H�E�

'����W�%�����!"�!#�!%�m�f�&<�t�&C�!D���	�E�	�������=&�
'��%�,�,�z�2�3�b�3�v�;�6F�F�"�#�2�J�E�	�%�,�,�z�2�3�b�3�v�;�6F�F��	
'��6�	��5�M���	�s$�A>�1C%�>A C"�!C"�%C=�<C=c���tt|t|��j�fd����g}|ttt|tt|��dd����z
}t
d�|D��t|�zdz
dkDr*|dd	}t
d�|D��t|�zdz
dkDr�*d
j|�S)aD
        A strategy which generates host names.

        @param allow_leading_digit: Whether to allow a leading digit in host
            names; they were not allowed prior to RFC 1123.

        @param allow_idn: Whether to allow non-ASCII characters as allowed by
            internationalized domain names (IDNs).
        )rac�"���rdS|dtvS)NTr)r)�l�allow_leading_digits �r-�<lambda>zhostnames.<locals>.<lambda>�s���$7�D��=>�q�T��=O�rXr�r[c3�2K�|]}t|����y�w)N)r>)r+rbs  r-r.zhostnames.<locals>.<genexpr>�s����1��#�e�*�1�s��Nr^�.)	rrr!�filterrr�sumr>r)rSrfra�labelss `  r-r"r"�s����
���#�i�8�?�?����	
�
��	�$���J���#�i�8����
�	
�		
���1�&�1�1�C��K�?�!�C�c�I��C�R�[�F��1�&�1�1�C��K�?�!�C�c�I��y�y�� � rXc�L�t�d�}dj|��atS)zH
        Returns a string containing valid URL path characters.
        c3�K�tt�D](}t|�}|dvr�	|jd�|���*y#t$rY�7wxYw�w)Nz#/?r))r@r	rArr_)r6�cs  r-�charszpath_characters.<locals>.charssZ�����z�*�
�A��q�	�A��E�z� �!�����)��G�
��.�!� �!�s%�#A
�>�A
�	A
�A
�	A
�
A
r7)�_path_charactersr)rrs r-�path_charactersrt�s(���#�
�" "�w�w�u�w�/���rXc�x�ttt|tt	dt���d����S)Nr)rOrQ�
)rP)rrrrrrt�rSs r-r$r$s4�����J���d�A��0A�B�R�P�
�
�	
rXc
�<�ttt|td����}tt|t���}ttt|t���}|dk(rd}ttt|td���|||��S)z�
        A strategy which generates L{EncodedURL}s.
        Call the L{EncodedURL.to_uri} method on each URL to get an HTTP
        protocol-friendly URI.
        T)rWrN)�http�https)�scheme�host�port�path)
rr
r5r%rr"rr$rr)rSr}r|r~s    r-r r #s~���H�S�M�4���(E�#F�G���D�$�y�{�+�,���H�T�N�D���M�2���1�9��D����d�<�0C�#D�E�F����	
�	
rXc�4�t|t���S)z�
        A strategy which generates L{DecodedURL}s.
        Call the L{EncodedURL.to_uri} method on each URL to get an HTTP
        protocol-friendly URI.
        )rr rws r-rr9s���$�|�~�.�/�/rX)�Tuple�)rN)F)T)TT)=�__doc__�
__future__r�
hypothesis�csvrr;�os.pathrr�stringrr�sysr	�typingr
rrr
rrrr�gziprr:r7rrr�hypothesis.strategiesrrrrr�idnarrrrR�__all__r&�DrawCallablerA�	NameError�chrrLr8r#r%r!r"rtrsr$r r�ImportErrorr�r�rXr-�<module>r�sb���'�z0���)�%�,��	�	�	�'�(�!���C�B��G�	���A��X�c�1�f�-�.��1�2�L���,�\�O�����@�O��O��+��+�Z�)!��)!�V �<���
��
��
��
�*�0��0��}������c����G��s#�C�C�C�C�
C)�(C)

Zerion Mini Shell 1.0