
    Mwg                     x    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y
)    )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y)DifferentialStyledxf)fontnumFmtfill	alignmentborder
protectionT)expected_type
allow_noneNc                 f    || _         || _        || _        || _        || _        || _        || _        y N)r   r   r   r   r   r   extLst)selfr   r   r   r   r   r   r   s           S/var/www/horilla/myenv/lib/python3.12/site-packages/openpyxl/styles/differential.py__init__zDifferentialStyle.__init__    s5     		"$    )NNNNNNN)__name__
__module____qualname__tagname__elements__r   r   r   r   r   r   r   r
   r   r	   r   r   r   r    r   r   r   r      sp    GRLt5D$?Ft5DI$?ID9FZDAJ  r   r   c                   j    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y)DifferentialStyleListz6
    Dedupable container for differential styles.
    dxfs)r   r   )countNc                     || _         y 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y| j                  j                  |       y)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   sF     #01K#.?*@@AA$++3r   c                 Z    | j                  |       | j                  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    DKK  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    488}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   sT     G
!2
3C5\FI &!   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   