
    #HJj                       U d Z ddlmZ ddlZddlZddlmZ ddlZerddl	m
Z
  ej                  e      ZdZeej                  iZded<   i Zd	ed
<   dZddZddZ eej                          ed        ed        ed        ed        ed        ed        ed        ed        e eej1                                     Zy)z~Maintains a registry of transport mechanisms.

The main entrypoint is :func:`get_transport`.  See also :file:`extending.md`.

    )annotationsN)TYPE_CHECKING)
ModuleType zdict[str, ModuleType]	_REGISTRYzdict[str, str]_ERRORSzYou are trying to use the %(module)s functionality of smart_open
but you do not have the correct %(module)s dependencies installed. Try:

    pip install smart_open[%(module)s]

c                   t        | t              r| }	 t        j                  |       } n| j
                  }|j                  d      d   }t        | d      r| j                  g}n)t        | d      r| j                  }n| d}t        |      dD ]  }t        | |      rJ | d|        |D ],  }|t        vsJ t        | d	d
      r
|t        |<   $| t        |<   . y# t        $ r Y yw xY w)ai  Register a submodule as a transport mechanism for ``smart_open``.

    This module **must** have:

        - `SCHEME` attribute (or `SCHEMES`, if the submodule supports multiple schemes)
        - `open` function
        - `open_uri` function
        - `parse_uri' function

    Once registered, you can get the submodule by calling :func:`get_transport`.

    N.SCHEMESCHEMESz. does not have a .SCHEME or .SCHEMES attribute)openopen_uri	parse_uriz is missing MISSING_DEPSF)
isinstancestr	importlibimport_moduleImportError__name__rsplithasattrr   r   
ValueErrorr   getattrr   )	submodulemodule_nameschemesmsgfschemes         ^/Users/ahmed/devFolder/claude-voice/.venv/lib/python3.12/site-packages/smart_open/transport.pyregister_transportr#   &   s    )S!	!//	:I  (($$S)"-Ky(###$	I	&##KLo.y!$G\!&GG$ / Y&&&9ne4)GFO )If %  		s   C 	C*)C*c                    t         }d} dj                  di t               }| t        v rt	        t
        dt        |    iz        | t        v r	t        |    S t        |      )zGet the submodule that handles transport for the specified scheme.

    This submodule must have been previously registered via :func:`register_transport`.

    z=https://github.com/piskvorky/smart_open/blob/master/README.mdzUnable to handle scheme {scheme!r}, expected one of {expected!r}. Extra dependencies required by {scheme!r} may be missing. See <{readme_url}> for details.module )SUPPORTED_SCHEMESformatlocalsr   r   _MISSING_DEPS_ERRORr   NotImplementedError)r!   expected
readme_urlmessages       r"   get_transportr/   Q   ss     !HPJ	1 	**0&	=398	= 
 -76?0KKLL  
g
&&    zsmart_open.azurezsmart_open.ftpzsmart_open.gcszsmart_open.hdfszsmart_open.httpzsmart_open.s3zsmart_open.sshzsmart_open.webhdfs)r   zstr | ModuleTypereturnNone)r!   r   r1   r   )__doc__
__future__r   r   loggingtypingr   smart_open.local_file
smart_opentypesr   	getLoggerr   logger	NO_SCHEME
local_filer   __annotations__r   r*   r#   r/   tuplesortedkeysr'   r&   r0   r"   <module>rB      s    #      			8	$	$-z/D/D#E	  E  (*V'( :(( ) % & # $ # $ $ % $ % ? # # $ ' (&!123  Sr0   