
    fh                         d dl mZmZmZ d dlmZ d dlmZmZm	Z	m
Z
mZ ddlmZ  G d de          Z G d d	e          Zd
S )    )TypedSequenceAlias)Serialisable)FontFillBorder	Alignment
Protection   )NumberFormatc                       e Zd ZdZdZ eed          Z eed          Z	 ee
d          Z eed          Z eed          Z eed          Z	 	 	 	 	 	 	 ddZdS )DifferentialStyledxf)fontnumFmtfill	alignmentborder
protectionT)expected_type
allow_noneNc                 h    || _         || _        || _        || _        || _        || _        || _        d S N)r   r   r   r   r   r   extLst)selfr   r   r   r   r   r   r   s           S/var/www/histauto/venv/lib/python3.11/site-packages/openpyxl/styles/differential.py__init__zDifferentialStyle.__init__    s9     		"$    )NNNNNNN)__name__
__module____qualname__tagname__elements__r   r   r   r   r   r   r   r
   r   r	   r   r   r   r    r   r   r   r      s        GRL5t555DU$???F5t555DI$???IUD999FZDAAAJ       r   r   c                   ~    e Zd ZdZdZ ee          Z ed          Z	dZ
ddZd	 Zd
 Zd Zd Zed             ZdS )DifferentialStyleListz6
    Dedupable container for differential styles.
    dxfs)r   r   )countr%   Nc                     || _         d S r   )r   )r   r   r)   s      r   r   zDifferentialStyleList.__init__>   s    r   c                     t          |t                    s$t          dt          t                    z             || j        v rdS | j                            |           dS )zV
        Check to see whether style already exists and append it if does not.
        z	expected N)
isinstancer   	TypeErrorstrstylesappendr   r   s     r   r0   zDifferentialStyleList.appendB   sb     #011 	BK#.?*@*@@AAA$+F3r   c                 `    |                      |           | j                            |          S )z?
        Add a differential style and return its index
        )r0   r/   indexr1   s     r   addzDifferentialStyleList.addM   s,     	C{  %%%r   c                 *    t          | j                  S r   )boolr/   r   s    r   __bool__zDifferentialStyleList.__bool__U   s    DK   r   c                     | j         |         S r   )r/   )r   idxs     r   __getitem__z!DifferentialStyleList.__getitem__Y   s    {3r   c                 *    t          | j                  S r   )lenr   r7   s    r   r)   zDifferentialStyleList.count]   s    48}}r   )r%   N)r    r!   r"   __doc__r#   r   r   r   r   r/   	__attrs__r   r0   r4   r8   r;   propertyr)   r%   r   r   r'   r'   2   s          G
(!2
3
3
3CU5\\FI        & & &! ! !        X  r   r'   N)openpyxl.descriptorsr   r   r   !openpyxl.descriptors.serialisabler   openpyxl.stylesr   r   r	   r
   r   numbersr   r   r'   r%   r   r   <module>rE      s           
 ; : : : : :              " ! ! ! ! !       >- - - - -L - - - - -r   