
    h                       S SK Jr  S SKJr  S SKJrJr  S SKJr	  S SK
Jr  S SKJr  S SKJr  S SKJrJr  S S	KJr  S S
KJrJr  \(       a/  S SKrS SKJr  S SKJrJr  \R:                  S:  a  S SKJr  OS SKJr  \" S5       SSS \SS.           SS jjj5       r \" S5       SSSS SSS.             SS jjj5       r!g)    )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          
        U c"  [         R                  " X#S9R                  5       n [        U [        5      (       a  [        U 5       Vs/ s H  nSU 3PM
     nnOU n[        U5      nUc  S/U-  nOd[        U5      (       a  U/U-  nOM[        U[        5      (       a'  [        U5      =o:w  a  SU	 SU S3n
[        U
5      eUnOU< S3n
[        U
5      e[        Xh5       VVs/ s H  u  p[        XUS9PM     snn$ s  snf s  snnf )	a  
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 datatype)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                e/home/james-whalen/.local/lib/python3.13/site-packages/polars/testing/parametric/strategies/legacy.pycolumnsr.      s   v |{{XBJJL$38;?;a#aS	;?ZF}37&6/			6!	E8	$	$E
"H-8*L?C!#&&	89c"" DGuCUVCUFV4CUVV'  @& Ws   C=#Dz:`create_list_strategy` is deprecated; use `lists` instead.)select_fromsizemin_sizemax_sizer   c                   Ub  U=p4U c  [        5       R                  5       n O[        U 5      R                  5       n [        U UUUUS9$ )aY  
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]
)r/   r1   r2   r   )r   r   r   r   )inner_dtyper/   r0   r1   r2   r   s         r-   create_list_strategyr5   p   sX    V ""h&&((5==?     )N)r%   zint | Sequence[str] | Noner   zOneOrMoreDataTypes | Noner   r!   r   r!   r   boolreturnzlist[column])r4   zPolarsDataType | Noner/   zSequence[Any] | Noner0   
int | Noner1   r!   r2   r9   r   r7   r8   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.   r5    r6   r-   <module>rK      s>   " $ % " - 0 , H ; Q4A
7"'0 0
 (,MW (,MW
$MW %MW 	MW
 MW MW MW	MW` HI)-8 )-8&8 &8 	8
 8 8 8 8 J8r6   