Graybyt3 Was Here
Linux cloud.locucionar.com 3.10.0-1160.81.1.el7.x86_64 #1 SMP Fri Dec 16 17:29:43 UTC 2022 x86_64
Apache
91.191.211.241
/
opt
/
imunify360
/
venv
/
lib64
/
python3.11
/
site-packages
/
pip
/
_vendor
/
rich
/
__pycache__
[ HOME ]
Exec
Submit
File Name : highlighter.cpython-311.pyc
� #�Fhr% � � � d dl Z d dlmZmZ d dlmZmZ ddlmZm Z de de fd�Z G d � d e� � Z G d� de� � Z G d � de� � Z G d� de� � Z G d� de� � Z G d� de� � Zedk �r�ddlmZ e� � Ze� d� � e� d� � e� d� � e� d� � e� d� � e� d� � e� d� � e� d� � e� d� � e� d � � e� d!� � e� d"� � e� d#� � e� d$� � e� d%� � e� d&� � e� d'� � e� d(� � e� d)� � d dlZe� ej d*dd+��,� � d�-� � dS dS ).� N)�ABC�abstractmethod)�List�Union� )�Span�Text�regexes�returnc �, � d� | � � S )z{Combine a number of regexes in to a single regex. Returns: str: New regex with all regexes ORed together. �|)�join)r s �|/builddir/build/BUILD/imunify360-venv-2.5.3/opt/imunify360/venv/lib/python3.11/site-packages/pip/_vendor/rich/highlighter.py�_combine_regexr s � � �8�8�G���� c �R � e Zd ZdZdeeef defd�Zededdfd�� � Z dS )�Highlighterz%Abstract base class for highlighters.�textr c �� � t |t � � rt |� � }n<t |t � � r|� � � }nt d|��� � �| � |� � |S )a Highlight a str or Text instance. Args: text (Union[str, ~Text]): Text to highlight. Raises: TypeError: If not called with text or str. Returns: Text: A test instance with highlighting applied. z#str or Text instance required, not )� isinstance�strr �copy� TypeError� highlight)�selfr �highlight_texts r �__call__zHighlighter.__call__ su � � �d�C� � � L�!�$�Z�Z�N�N� ��d� #� #� L�!�Y�Y�[�[�N�N��J�$�J�J�K�K�K����~�&�&�&��r Nc � � dS )zoApply highlighting in place to text. Args: text (~Text): A text object highlight. N� �r r s r r zHighlighter.highlight) � � � � r ) �__name__� __module__�__qualname__�__doc__r r r r r r r r r r r ss � � � � � �/�/��U�3��9�-� �$� � � � �* ��d� �t� � � � �^�� � r r c �"