OwlCyberSecurity - MANAGER
Edit File: structs.cpython-310.pyc
o ����ƚRe�����������������������@���sb���d�dl�Z�ddlmZ�G�dd��de�ZG�dd��dej�ZG�dd ��d e�ZG�d d��de�Zdd ��Z dS�)�����N����)�collections_abcc�������������������@���sp���e�Zd�ZdZdd��Zdd��Zdd��Zdd ��Zd d��Zdd ��Z dd��Z dd��Zdd��Zdd��Z dd��Zdd��ZdS�)� DirectedGraphz&A graph structure with directed edges.c�����������������C���s���t���|�_i�|�_i�|�_d�S��N)�set� _vertices� _forwards� _backwards��self��r�����/builddir/build/BUILDROOT/alt-python310-pip-21.3.1-3.el8.x86_64/opt/alt/python310/lib/python3.10/site-packages/pip/_vendor/resolvelib/structs.py�__init__ ���s��� zDirectedGraph.__init__c�����������������C���� ���t�|�j�S�r���)�iterr���r ���r���r���r ����__iter__������� zDirectedGraph.__iter__c�����������������C���r���r���)�lenr���r ���r���r���r ����__len__���r���zDirectedGraph.__len__c�����������������C���s ���||�j�v�S�r���)r����r����keyr���r���r ����__contains__���r���zDirectedGraph.__contains__c�����������������C���sB���t���}t|�j�|_dd��|�j���D��|_dd��|�j���D��|_|S�)z$Return a shallow copy of this graph.c�����������������S�������i�|�] \}}|t�|��qS�r����r�����.0�k�vr���r���r ���� <dictcomp>��������z&DirectedGraph.copy.<locals>.<dictcomp>c�����������������S���r���r���r���r���r���r���r ���r������r���)r���r���r���r����itemsr ���)r����otherr���r���r ����copy���s ���zDirectedGraph.copyc�����������������C���s:���||�j�v�r td��|�j��|��t��|�j|<�t��|�j|<�dS�)zAdd a new vertex to the graph.z vertex existsN)r���� ValueError�addr���r���r ���r���r���r���r ���r$������s ��� zDirectedGraph.addc�����������������C���sT���|�j��|��|�j�|�D�] }|�j|��|��q|�j�|�D�] }|�j|��|��qdS�)zCRemove a vertex from the graph, disconnecting all edges from/to it.N)r����remover����popr ���)r���r����f�tr���r���r ���r%���'���s����zDirectedGraph.removec�����������������C���s���||�j�|�v�o ||�j|�v�S�r���)r ���r����r���r'���r(���r���r���r ���� connected/���s���zDirectedGraph.connectedc�����������������C���s6���||�j�vr t|��|�j|��|��|�j|��|��dS�)zgConnect two existing vertices. Nothing happens if the vertices are already connected. N)r����KeyErrorr���r$���r ���r)���r���r���r ����connect2���s��� zDirectedGraph.connectc�����������������c���s.�����|�j����D�]\}}|D�]}||fV��qqd�S�r���)r���r ���)r���r'����childrenr(���r���r���r ���� iter_edges<���s������zDirectedGraph.iter_edgesc�����������������C�������t�|�j|��S�r���)r���r���r���r���r���r ���� iter_childrenA�������zDirectedGraph.iter_childrenc�����������������C���r/���r���)r���r ���r���r���r���r ����iter_parentsD���r1���zDirectedGraph.iter_parentsN)�__name__� __module__�__qualname__�__doc__r���r���r���r���r"���r$���r%���r*���r,���r.���r0���r2���r���r���r���r ���r������s���� r���c�������������������@���sJ���e�Zd�Zddd�Zdd��Zdd��ZeZdd ��Zd d��Zdd ��Z dd��Z dS�)�IteratorMappingNc�����������������C���s���||�_�||�_|p i�|�_d�S�r���)�_mapping� _accessor�_appends)r����mapping�accessor�appendsr���r���r ���r���I���s���zIteratorMapping.__init__c�����������������C���s���d��|�j|�j|�j�S�)Nz!IteratorMapping({!r}, {!r}, {!r}))�formatr8���r9���r:���r ���r���r���r ����__repr__N���s ����zIteratorMapping.__repr__c�����������������C���s���t�|�jp|�j�S�r���)�boolr8���r:���r ���r���r���r ����__bool__U���s���zIteratorMapping.__bool__c�����������������C���s���||�j�v�p ||�jv�S�r���)r8���r:���r���r���r���r ���r���Z�������zIteratorMapping.__contains__c�����������������C���sL���z|�j�|�}W�n�ty���t|�j|���Y�S�w�t�|��|�|�j�|d��S�)Nr���)r8���r+���r���r:���� itertools�chainr9����get)r���r���r���r���r���r ����__getitem__]���s����zIteratorMapping.__getitem__c��������������������s"�����fdd���j�D��}t���j|�S�)Nc�����������������3���s�����|�] }|��j�vr|V��qd�S�r����r8����r���r���r ���r���r ���� <genexpr>e���������z+IteratorMapping.__iter__.<locals>.<genexpr>)r:���rC���rD���r8����r����morer���r ���r ���r���d���s���zIteratorMapping.__iter__c��������������������s&���t���fdd���jD���}t��j�|�S�)Nc�����������������3���s�����|�] }|��j�vrd�V��qdS�)r���NrG���rH���r ���r���r ���rI���i���rJ���z*IteratorMapping.__len__.<locals>.<genexpr>)�sumr:���r���r8���rK���r���r ���r ���r���h���s���zIteratorMapping.__len__r���)r3���r4���r5���r���r?���rA����__nonzero__r���rF���r���r���r���r���r���r ���r7���H���s���� r7���c�������������������@����4���e�Zd�ZdZdd��Zdd��Zdd��ZeZdd ��Zd S�)�_FactoryIterableViewa:��Wrap an iterator factory returned by `find_matches()`. Calling `iter()` on this class would invoke the underlying iterator factory, making it a "collection with ordering" that can be iterated through multiple times, but lacks random access methods presented in built-in Python sequence types. c�����������������C���� ���||�_�d�S�r�����_factory)r����factoryr���r���r ���r���v���r���z_FactoryIterableView.__init__c�����������������C���s���d��t|��jt|������S��Nz{}({}))r>����typer3����listrS���r ���r���r���r ���r?���y���s���z_FactoryIterableView.__repr__c�����������������C���s(���z t�|������W�dS��ty���Y�dS�w�)NFT)�nextrS���� StopIterationr ���r���r���r ���rA���|���s�����z_FactoryIterableView.__bool__c�����������������C���s���|�����S�r���rR���r ���r���r���r ���r�������s���z_FactoryIterableView.__iter__N� r3���r4���r5���r6���r���r?���rA���rN���r���r���r���r���r ���rP���m���s����rP���c�������������������@���rO���)�_SequenceIterableViewz�Wrap an iterable returned by find_matches(). This is essentially just a proxy to the underlying sequence that provides the same interface as `_FactoryIterableView`. c�����������������C���rQ���r���)� _sequence)r����sequencer���r���r ���r�������r���z_SequenceIterableView.__init__c�����������������C���s���d��t|��j|�j�S�rU���)r>���rV���r3���r\���r ���r���r���r ���r?�������rB���z_SequenceIterableView.__repr__c�����������������C���r���r���)r@���r\���r ���r���r���r ���rA�������r���z_SequenceIterableView.__bool__c�����������������C���r���r���)r���r\���r ���r���r���r ���r�������r���z_SequenceIterableView.__iter__NrZ���r���r���r���r ���r[�������s����r[���c�����������������C���s,���t�|��rt|��S�t|�tj�st|��}�t|��S�)zCBuild an iterable view from the value returned by `find_matches()`.)�callablerP���� isinstancer����SequencerW���r[���)�matchesr���r���r ����build_iter_view����s ���rb���) rC����compatr����objectr����Mappingr7���rP���r[���rb���r���r���r���r ����<module>���s����B%