HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux spn-python 5.15.0-89-generic #99-Ubuntu SMP Mon Oct 30 20:42:41 UTC 2023 x86_64
User: arjun (1000)
PHP: 8.1.2-1ubuntu2.20
Disabled: NONE
Upload Files
File: //usr/local/lib/python3.10/dist-packages/packaging/__pycache__/requirements.cpython-310.pyc
o

���g��@s~ddlmZddlmZmZddlmZddlm	Z	ddl
mZmZddl
mZddlmZGd	d
�d
e�ZGdd�d�Zd
S)�)�annotations)�Any�Iterator�)�parse_requirement)�ParserSyntaxError)�Marker�_normalize_extra_values)�SpecifierSet)�canonicalize_namec@seZdZdZdS)�InvalidRequirementzJ
    An invalid requirement was found, users should refer to PEP 508.
    N)�__name__�
__module__�__qualname__�__doc__�rr�A/usr/local/lib/python3.10/dist-packages/packaging/requirements.pyrsrc@sLeZdZdZddd�Zdd
d�Zddd
�Zddd�Zddd�Zddd�Z	dS)�Requirementz�Parse a requirement.

    Parse a given requirement string into its parts, such as name, specifier,
    URL, and extras. Raises InvalidRequirement on a badly-formed requirement
    string.
    �requirement_string�str�return�Nonec
Cs�zt|�}Wnty}ztt|��|�d}~ww|j|_|jp"d|_t|jp)g�|_t|j	�|_	d|_
|j
durIt�t�|_
t
|j
�|j
_dSdS�N)�_parse_requirementrrr�name�url�set�extrasr
�	specifier�markerr�__new__r	�_markers)�selfr�parsed�errr�__init__"s��
�zRequirement.__init__r�
Iterator[str]ccsz�|V|jrd�t|j��}d|�d�V|jrt|j�V|jr/d|j��V|jr/dV|jr;d|j��VdSdS)N�,�[�]z@ � z; )r�join�sortedrrrr)r"r�formatted_extrasrrr�_iter_parts1s��zRequirement._iter_partscCsd�|�|j��S)N�)r+r.r�r"rrr�__str__CszRequirement.__str__cCsd|�d�S)Nz<Requirement('z')>rr0rrr�__repr__FszRequirement.__repr__�intcCs t|jjg|�t|j���R�Sr)�hash�	__class__r
r.rrr0rrr�__hash__Is���zRequirement.__hash__�otherr�boolcCsRt|t�stSt|j�t|j�ko(|j|jko(|j|jko(|j|jko(|j|jkSr)	�
isinstancer�NotImplementedrrrrrr)r"r7rrr�__eq__Qs

�
�
�
�zRequirement.__eq__N)rrrr)rrrr&)rr)rr3)r7rrr8)
r
rrrr%r.r1r2r6r;rrrrrs




rN)�
__future__r�typingrr�_parserrr�
_tokenizerr�markersrr	�
specifiersr
�utilsr�
ValueErrorrrrrrr�<module>s