Файловый менеджер - Редактировать - /usr/lib/python3/dist-packages/pip/_vendor/rich/__pycache__/highlighter.cpython-310.pyc
Ðазад
o !��h � @ sn d dl mZmZ d dlmZmZ ddlmZ dedefdd�Z G d d � d e�Z G dd� de �ZG d d� de �ZG dd� de�Z G dd� de�Zedkr�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(S d(S ))� )�ABC�abstractmethod)�List�Union� )�Text�regexes�returnc G s d� | �S )z{Combine a number of regexes in to a single regex. Returns: str: New regex with all regexes ORed together. �|)�join)r � r �>/usr/lib/python3/dist-packages/pip/_vendor/rich/highlighter.py�_combine_regex s r c @ s@ e Zd ZdZdeeef defdd�Zededdfdd��Z dS ) �Highlighterz%Abstract base class for highlighters.�textr c C sD t |t�r t|�}nt |t�r|�� }ntd|����| �|� |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_textr r r �__call__ s zHighlighter.__call__Nc C � dS )zoApply highlighting in place to text. Args: text (~Text): A text object highlight. Nr �r r r r r r ( � zHighlighter.highlight) �__name__� __module__�__qualname__�__doc__r r r r r r r r r r r s r c @ s"