o
    ýÑÐbä  ã                   @   sX   d Z g d¢Zdd„ Zdd„ Zdd„ Zdd	„ Zd
d„ Zdd„ Zdd„ Zdd„ Z	dd„ Z
dS )z Errors for invalid slice indices)é   é   é   c                   C   s   t tt… S )zfunctions used as indices)ÚTESTLISTÚid© r   r   úi/var/www/secure340b-portal/env/lib/python3.10/site-packages/pylint/test/functional/invalid_slice_index.pyÚ	function1   ó   r   c                   C   s   t dd… S )zstrings used as indicesÚ0Ú1©r   r   r   r   r   Ú	function2   r	   r   c                  C   s   G dd„ dt ƒ} t| ƒ d… S )z%class without __index__ used as indexc                   @   ó   e Zd ZdZdS )zfunction3.<locals>.NoIndexTestzClass with no __index__ methodN©Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r   r   r   ÚNoIndexTest   ó    r   N©Úobjectr   )r   r   r   r   Ú	function3   s   r   c                   C   ó   t ddd… S )zintegers used as indicesé    r   r   r   r   r   Ú	function4   ó   r   c                   C   r   )zNone used as indicesNr   r   r   r   r   Ú	function5   r   r   c                  C   s    G dd„ dt ƒ} t| ƒ dd… S )z"class with __index__ used as indexc                   @   ó   e Zd ZdZdd„ ZdS )zfunction6.<locals>.IndexTestúClass with __index__ methodc                 S   ó   dS ©z7Allow objects of this class to be used as slice indicesr   r   ©Úselfr   r   r   Ú	__index__&   ó   z&function6.<locals>.IndexTest.__index__N©r   r   r   r   r$   r   r   r   r   Ú	IndexTest$   ó    r'   Nr   )r'   r   r   r   Ú	function6"   s   r)   c                  C   s0   G dd„ dt ƒ} G dd„ d| ƒ}t|ƒ dd… S )z0class with __index__ in superclass used as indexc                   @   r   )zfunction7.<locals>.IndexTyper   c                 S   r    r!   r   r"   r   r   r   r$   0   r%   z&function7.<locals>.IndexType.__index__Nr&   r   r   r   r   Ú	IndexType.   r(   r*   c                   @   r   )zfunction7.<locals>.IndexSubTypezClass with __index__ in parentNr   r   r   r   r   ÚIndexSubType4   r   r+   Nr   )r*   r+   r   r   r   Ú	function7,   s   r,   c                   C   s   t tdddƒ S )zslice object used as indexr   r   r   )r   Úslicer   r   r   r   Ú	function8:   s   r.   c                  C   sL   G dd„ dƒ} | ƒ ddd…  | ƒ ddd…dd…f  | ƒ t dddƒ  dS )z9Use a custom class that knows how to handle string slicesc                   @   s   e Zd Zdd„ ZdS )zfunction9.<locals>.StringSlicec                 S   s   |S )Nr   )r#   Úitemr   r   r   Ú__getitem__B   s   z*function9.<locals>.StringSlice.__getitem__N)r   r   r   r0   r   r   r   r   ÚStringSliceA   s    r1   ÚaÚbÚcN)r-   )r1   r   r   r   Ú	function9?   s   r5   N)r   r   r   r   r   r   r   r)   r,   r.   r5   r   r   r   r   Ú<module>   s    

