Ë
    	êñiê  ã                  óv  — d dl mZ d dlmZ d dlmZmZ d dlmZ	 d dl
mZ d dlmZ d dlmZ d dlmZmZ d d	lmZ d d
lmZmZ er.d dlZd dlmZ d dlmZmZ ej:                  dk\  rd dlmZ nd dlmZ  ed«      	 ddd eddœ	 	 	 	 	 	 	 	 	 	 	 dd„«       Z  ed«      	 dddd dddœ	 	 	 	 	 	 	 	 	 	 	 	 	 dd„«       Z!y)é    )Úannotations)ÚSequence)ÚTYPE_CHECKINGÚAnyN)ÚInvalidArgument)Ú
deprecated)Úis_polars_dtype)Ú
_COL_LIMITÚcolumn)Úlists)Ú_instantiate_dtypeÚdtypes)ÚSearchStrategy)ÚOneOrMoreDataTypesÚPolarsDataType)é   é   zX`columns` is deprecated; use `column` instead, in conjunction with a list comprehension.F)ÚdtypeÚmin_colsÚmax_colsÚuniquec          	     óö  — | €%t        j                  ||¬«      j                  «       } t        | t        «      rt        | «      D �cg c]  }d|› �‘Œ	 }}n| }t        |«      }|€dg|z  }nYt        |«      r|g|z  }nGt        |t        «      r't        |«      x}	|k7  rd|	› d|› d�}
t        |
«      ‚|}n|›d�}
t        |
«      ‚t        ||d¬	«      D ��cg c]  \  }}t        |||¬
«      ‘Œ c}}S c c}w c c}}w )aG  
    Define multiple columns for use with the @dataframes strategy.

    .. deprecated:: 0.20.26
        Use :class:`column` instead, in conjunction with a list comprehension.

    .. warning::
        This functionality is currently considered **unstable**. It may be
        changed at any point without it being considered a breaking change.

    Generate a fixed sequence of `column` objects suitable for passing to the
    @dataframes strategy, or using standalone (note that this function is not itself
    a strategy).

    Notes
    -----
    Additional control is available by creating a sequence of columns explicitly,
    using the `column` class (an especially useful option is to override the default
    data-generating strategy for a given col/dtype).

    Parameters
    ----------
    cols : {int, [str]}, optional
        integer number of cols to create, or explicit list of column names. if
        omitted a random number of columns (between mincol and max_cols) are
        created.
    dtype : PolarsDataType, optional
        a single dtype for all cols, or list of dtypes (the same length as `cols`).
        if omitted, each generated column is assigned a random dtype.
    min_cols : int, optional
        if not passing an exact size, can set a minimum here (defaults to 0).
    max_cols : int, optional
        if not passing an exact size, can set a maximum value here (defaults to
        MAX_COLS).
    unique : bool, optional
        indicate if the values generated for these columns should be unique
        (per-column).

    Examples
    --------
    >>> from polars.testing.parametric import columns, dataframes
    >>> from hypothesis import given
    >>> @given(dataframes(columns(["x", "y", "z"], unique=True)))  # doctest: +SKIP
    ... def test_unique_xyz(df: pl.DataFrame) -> None:
    ...     assert_something(df)
    N)Ú	min_valueÚ	max_valueÚcolzgiven z dtypes for z namesz is not a valid polars datatypeT)Ústrict)Únamer   r   )ÚstÚintegersÚexampleÚ
isinstanceÚintÚrangeÚlenr	   r   r   Úzipr   )Úcolsr   r   r   r   ÚnÚnamesÚn_colsr   Ún_dtypesÚmsgÚnmÚtps                úm/var/www/pod-logistic/pod-ai/venv/lib/python3.12/site-packages/polars/testing/parametric/strategies/legacy.pyÚcolumnsr/      s  € ðv €|Ü�{‰{ X¸ÔB×JÑJÓLˆÜ�$œÔÜ38¸³;Ö?¨a # a S¢	Ð?ˆÑ?àˆÜ�‹Z€Fà€}Ø37°&¸6±/‰Ü	˜Ô	Ø�˜6Ñ!‰Ü	�Eœ8Ô	$Ü˜E›
Ð"ˆH vÒ-Ø˜8˜* L°°¸Ð?ˆCÜ! #Ó&Ð&Ø‰à�	Ð8Ð9ˆÜ˜cÓ"Ð"ô
 ˜% °Ô5÷áˆB�ô 	�B˜b¨Ö0óð ùò'  @ùó&s   ÁC0ÃC5z:`create_list_strategy` is deprecated; use `lists` instead.)Úselect_fromÚsizeÚmin_sizeÚmax_sizer   c               ó–   — |�|x}}| €t        «       j                  «       } nt        | «      j                  «       } t        | ||||¬«      S )aÉ  
    Create a strategy for generating Polars :class:`List` data.

    .. deprecated:: 0.20.26
        Use :func:`lists` instead.

    Parameters
    ----------
    inner_dtype : PolarsDataType
        type of the inner list elements (can also be another List).
    select_from : list, optional
        randomly select the innermost values from this list (otherwise
        the default strategy associated with the innermost dtype is used).
    size : int, optional
        if set, generated lists will be of exactly this size (and
        ignore the min_size/max_size params).
    min_size : int, optional
        set the minimum size of the generated lists (default: 0 if unset).
    max_size : int, optional
        set the maximum size of the generated lists (default: 3 if
        min_size is unset or zero, otherwise 2x min_size).
    unique : bool, optional
        ensure that the generated lists contain unique values.

    Examples
    --------
    Create a strategy that generates a list of i32 values:

    >>> from polars.testing.parametric import create_list_strategy
    >>> lst = create_list_strategy(inner_dtype=pl.Int32)  # doctest: +SKIP
    >>> lst.example()  # doctest: +SKIP
    [-11330, 24030, 116]
    )r0   r2   r3   r   )r   r    r   r   )Úinner_dtyper0   r1   r2   r3   r   s         r.   Úcreate_list_strategyr6   s   sZ   € ðV ÐØ"Ð"ˆ�8àÐÜ“h×&Ñ&Ó(‰ä(¨Ó5×=Ñ=Ó?ˆäØØØØØôð ó    )N)r&   zint | Sequence[str] | Noner   zOneOrMoreDataTypes | Noner   r"   r   r"   r   ÚboolÚreturnzlist[column])r5   zPolarsDataType | Noner0   zSequence[Any] | Noner1   ú
int | Noner2   r"   r3   r:   r   r8   r9   zSearchStrategy[list[Any]])"Ú
__future__r   Úcollections.abcr   Útypingr   r   Úhypothesis.strategiesÚ
strategiesr   Úhypothesis.errorsr   Úpolars._utils.deprecationr   Úpolars.datatypesr	   Ú)polars.testing.parametric.strategies.corer
   r   Ú)polars.testing.parametric.strategies.datar   Ú*polars.testing.parametric.strategies.dtyper   r   Úsysr   Úpolars._typingr   r   Úversion_infoÚwarningsÚtyping_extensionsr/   r6   © r7   r.   ú<module>rL      s5  ðÝ "å $ß %å "Ý -å 0Ý ,ß HÝ ;ß QáÛå4çAà
×Ñ˜7Ò"Þ'å0ñ ð0óð
 (,ðPð (,ØØØñPØ
$ðPð %ðPð ð	Pð
 ðPð ðPð òPó	ðPñf ÐHÓIà)-ð8ð )-ØØØØñ8Ø&ð8ð &ð8ð ð	8ð
 ð8ð ð8ð ð8ð ò8ó Jñ8r7   