Файловый менеджер - Редактировать - /opt/imh-python/lib/python3.9/site-packages/prompt_toolkit/styles/__pycache__/style_transformation.cpython-39.pyc
Ðазад
a d�h�0 � @ s� d Z ddlmZ ddlmZmZ ddlmZmZ ddl m Z mZmZ ddl mZ ddlmZmZ ddlmZmZmZ d d lmZmZ d dlmZ g d�ZG d d� ded�ZG dd� de�ZG dd� de�ZG dd� de�ZG dd� de�Z G dd� de�Z!G dd� de�Z"G dd� de�Z#G dd� de�Z$d dd!�d"d#�Z%d$d%d&d'd(d)d*d+d,d-d.d/d0d1d2d3d4d5�Z&e'e&�(� �e'e�k�s|J �e'e&�)� �e'e�k�s�J �e� d6d6d7�d8d9��Z*d:S );a� Collection of style transformations. Think of it as a kind of color post processing after the rendering is done. This could be used for instance to change the contrast/saturation; swap light and dark colors or even change certain colors for other colors. When the UI is rendered, these transformations can be applied right after the style strings are turned into `Attrs` objects that represent the actual formatting. � )�annotations)�ABCMeta�abstractmethod)� hls_to_rgb� rgb_to_hls)�Callable�Hashable�Sequence)�memoized)�FilterOrBool� to_filter)�AnyFloat�to_float�to_str� )�ANSI_COLOR_NAMES�Attrs)�parse_color) �StyleTransformation�#SwapLightAndDarkStyleTransformation�ReverseStyleTransformation�"SetDefaultColorStyleTransformation�#AdjustBrightnessStyleTransformation�DummyStyleTransformation�ConditionalStyleTransformation�DynamicStyleTransformation�merge_style_transformationsc @ s2 e Zd ZdZeddd�dd��Zdd�dd �Zd S )r z2 Base class for any style transformation. r ��attrs�returnc C s dS )z� Take an `Attrs` object and return a new `Attrs` object. Remember that the color formats can be either "ansi..." or a 6 digit lowercase hexadecimal color (without '#' prefix). N� ��selfr r r ��/root/rpmbuild/BUILDROOT/imh-python39-modules-3.9.7-92.el8.x86_64/opt/imh-python/lib/python3.9/site-packages/prompt_toolkit/styles/style_transformation.py�transform_attrs, s z#StyleTransformation.transform_attrsr �r c C s | j j� dt| �� �S )zE When this changes, the cache should be invalidated. �-)� __class__�__name__�id�r"