OwlCyberSecurity - MANAGER
Edit File: feature_base.cpython-311.pyc
� ������h������������������������J�����d�Z�dZdZ�G�d��de������������Z�G�d��de������������ZdS�)z� Base classes for features that are backwards-incompatible. Usage: features = Features() features.add(Feature("py3k_feature", "power< 'py3k' any* >", "2.7")) PATTERN = features.PATTERN z%s=%sz- %s is only supported in Python %s and above.c�������������������������e�Zd�ZdZd��Zd��ZdS�)�Featurez� A feature has a name, a pattern, and a minimum version of Python 2.x required to use the feature (or 3.x if there is no backwards-compatible version of 2.x) c������������������0�����||�_���������||�_��������||�_��������d�S�)N)�name�_pattern�version)�selfr����PATTERNr���s��� �q/builddir/build/BUILD/cloudlinux-venv-1.0.8/venv/lib/python3.11/site-packages/libpasteurize/fixes/feature_base.py�__init__zFeature.__init__���s�������� ��� ����������c������������������.�����t�����������|�j��������|�j��������fz��S�)zS Format the above text with the name and minimum version required. )�message_unformattedr���r����r���s��� r ����message_textzFeature.message_text���s�������#�d�i���%>�>�>r���N)�__name__� __module__�__qualname__�__doc__r���r�����r���r ���r���r������s<����������������� ����� ?��?��?��?��?r���r���c��������������������8�����e�Zd�ZdZi�Zd��Zed����������������Zd��ZdS�)�Featuresz� A set of features that generates a pattern for the features it contains. This set will act like a mapping in that we map names to patterns. c������������������\�����t����������d��t����������|�������������D���������������������������|�_��������dS�)zS Called every time we care about the mapping of names to features. c������������������ �����g�|�]}|j���������|f��S�r���)r�����.0�fs��� r ���� <listcomp>z+Features.update_mapping.<locals>.<listcomp>*���s������=�=�=�Q�a�f�a�[�=�=�=r���N)�dict�iter�mappingr���s��� r ����update_mappingzFeatures.update_mapping&���s,��������=�=�$�t�*�*�=�=�=�>�>����r���c�����������������������|��������������������������������������d���������������������d��t����������|�������������D���������������������������S�)z{ Uses the mapping of names to features to return a PATTERN suitable for using the lib2to3 patcomp. z | c������������������:�����g�|�]}t�����������|j��������|j��������fz����S�r���)�pattern_unformattedr���r���r���s��� r ���r���z$Features.PATTERN.<locals>.<listcomp>3���s'������\�\�\�A�0�A�F�A�J�3G�G�\�\�\r���)r!����joinr���r���s��� r ���r ���zFeatures.PATTERN,���sA������� �������|�|�\�\�QU�VZ�Q[�Q[�\�\�\�]�]�]r���c�����������������������|�j���������|���������S�)zH Implement a simple mapping to get patterns from names. )r ���)r����keys��� r ����__getitem__zFeatures.__getitem__5���s��������|�C� � r���N) r���r���r���r���r ���r!����propertyr ���r(���r���r���r ���r���r������sa�������������������G�?��?��?���^��^���X�^�!��!��!��!��!r���r���N)r���r$���r����objectr����setr���r���r���r ����<module>r,������s}������������0���?��?��?��?��?�f��?��?��?�"!��!��!��!��!�s��!��!��!��!��!r���