
    k7i              
       t    S SK r S SKJr  S SKJrJr  S SKJrJr  S\	4S jr
SS.S\S	\S
\S-  S\\   4S jjrg)    N)Path)Anyget_args)resolvetoken_countreturnc                 v    U [         L a  g[        U 5       H   n[        U5      n[        U5      (       d  M     g   g)NTF)r   r   r   _is_path)type_
inner_types     K/home/james-whalen/.local/lib/python3.13/site-packages/cyclopts/_env_var.pyr
   r
      s7    }uo
Z(
J &
     )	delimiterr   valr   c                    [        U 5      n [        U 5      u  p4US:  d  U(       a@  [        U 5      (       a  UR                  [        R
                  5      $ UR                  U5      $ U/$ )a  Type-dependent environment variable value splitting.

Converts a single string into a list of strings. Splits when:

* The ``type_`` is some variant of ``Iterable[pathlib.Path]`` objects.
  If Windows, split on ``;``, otherwise split on ``:``.

* Otherwise, if the ``type_`` is an ``Iterable``, split on whitespace.
  Leading/trailing whitespace of each output element will be stripped.

This function is the default value for :attr:`cyclopts.App.env_var_split`.

Parameters
----------
type_: type
    Type hint that we will eventually coerce into.
val: str
    String to split.
delimiter: str | None
    Delimiter to split ``val`` on.
    If None, defaults to whitespace.

Returns
-------
list[str]
    List of individual string tokens.
   )r   r   r
   splitospathsep)r   r   r   countconsume_alls        r   env_var_splitr      sT    B ENE$U+EqyK(0syy$QSYYy=QQur   )r   pathlibr   typingr   r   cyclopts._convertr   r   boolr
   strlistr    r   r   <module>r       sS    	    2	t 	  !	''	' Tz	'
 
#Y'r   