
    >ie                    h   d dl mZ d dlZd dlmZ d dlZd dlZd dlmZ d dl	Z	d dl	m
Z
 ddgdd	Z ej        e
           ej        e
          d                         Ze                                d             Ze                                d             Ze                                d             Ze                                d             Ze                    d           ej        ddd          dd                        Ze                    d          d             Zd Zd ZdS )    )annotationsN)reduce)dump)__version__z-hz--helpX   )help_option_namesmax_content_width)context_settingsc                     dS )zDask command line interface.N r       (lib/python3.11/site-packages/dask/cli.pyclir      s	     	Dr   c                 8    ddl } |                     d           dS )zBOpen Dask documentation (https://docs.dask.org/) in a web browser.r   Nzhttps://docs.dask.org)
webbrowseropen)r   s    r   docsr      s)     OO+,,,,,r   c                     dS )z)Information about your dask installation.Nr   r   r   r   infor   "   	     	Dr   c                 &    ddl m}   |              dS )z(Print versions of Dask related projects.r   show_versionsN)
dask.utilsr   r   s    r   versionsr   (   s%     )(((((MOOOOOr   c                     dS )zDask config settingsNr   r   r   r   configr   0   r   r   get)namekeyF)defaultrequiredc                *   | dv r9t          j        t          j        d          d           t          d           dS 	 t	          d |                     d          t          j        j                  }t          |t          t          f          r#t          j        t          |                     dS t          j        |           dS # t          $ r@ t          j        t          j        d|  d	
          d           t          d           Y dS w xY w)z&Print config key, or the whole config.)N zAConfig key not specified. Are you looking for "dask config list"?T)err   c                    | |         S Nr   )dks     r   <lambda>zconfig_get.<locals>.<lambda>D   s
    qt r   .zSection not found: red)fgN)clickechostyleexitr   splitdaskr   
isinstancelistdictecho_via_pagerr   KeyError)r    datas     r   
config_getr;   6   s    j
KW  		
 	
 	
 	
 	Q	++SYYs^^T[=OPPD$t-- !$T$ZZ00000
4      	 	 	Ju{#>#>#>5IIItTTTTGGGGGG	s   A1C 2C ADDr6   c                 f    t          j        t          t          j        j                             dS )zPrint the whole config.N)r/   r8   r   r4   r   r   r   r   config_listr=   N   s(     
dk01122222r   c                   	 |                                 }n8# t          $ r+}t          j        d|j         d| d           Y d}~dS d}~ww xY wt          |t          j        t          j        f          s't          j        dt          |           d           dS |j        | j
        v rt          j        d|j         d           |                     |           dS )a  Add `entry_point` command to `interface`.

    Parameters
    ----------
    interface : click.Command or click.Group
        The click interface to augment with `entry_point`.
    entry_point : importlib.metadata.EntryPoint
        The entry point which loads to a ``click.Command`` or
        ``click.Group`` instance to be added as a sub-command or
        sub-group in `interface`.

    z)While registering the command with name 'z', an exception ocurred; r,   NzRentry points in 'dask_cli' must be instances of click.Command or click.Group, not zC', an existing command or group; the original has been overwritten.)load	Exceptionwarningswarnr   r5   r/   CommandGrouptypecommandsadd_command)	interfaceentry_pointcommandes       r   _register_command_eprL   T   s7   ""$$   '8H ' '"#' ' '	
 	
 	
 	 gu{;<< B15gB B B	
 	
 	
 	|y)))L L L L	
 	
 	

 '"""""s    
A AAc                 |    t          j        d          D ]} t          t          |            t                       dS )z$Run the dask command line interface.dask_cli)groupN)importlib_metadataentry_pointsrL   r   )eps    r   run_clirS   y   sA    
 !-J??? & &S"%%%%EEEEEr   r(   )
__future__r   rA   	functoolsr   r/   rP   yamlr   r4   r   CONTEXT_SETTINGSrO   version_optionr   rJ   r   r   r   r   argumentr;   r=   rL   rS   r   r   r   <module>rZ      s   " " " " " "                          )   .///k""	 	 #" 0/	
 - - - 	 	 	
    	 	 	
 Ute444   54 , V3 3 3
"# "# "#J
 
 
 
 
r   