K i ZddlmZddlZddlmZddlmZdgZddZ d d dZ y) ) annotationsN)Iterable)Any lazy_importcd}||dk(r#|dz }|t|ksJd||dk(r#t||d|d|g|}t||S)aN Import ``name`` from ``source`` in ``namespace``. There are two use cases: - ``name`` is an object defined in ``source``; - ``name`` is a submodule of ``source``. Neither :func:`__import__` nor :func:`~importlib.import_module` does exactly this. :func:`__import__` is closer to the intended behavior. r.z%importing from parent isn't supportedN)len __import__getattr)namesource namespacelevelmodules X/mnt/ssd/data/python-lab/Trading/venv/lib/python3.12/site-packages/websockets/imports.py import_namer sm E -3   s6{"K$KK" -3 uv 4$ GF 64  ciitttzrJdzrJdzrJdddfd }|d<d fd }|d<y) a Provide lazy, module-level imports. Typical use:: __getattr__, __dir__ = lazy_import( globals(), aliases={ "": "", ... }, deprecated_aliases={ ..., } ) This function defines ``__getattr__`` and ``__dir__`` per :pep:`562`. Nznamespace conflict__name__cJ |}t||S#t$rYnwxYwJ |}tjd|dtdt||S#t$rYnwxYwt dd|)Nrz is deprecated) stacklevelzmodule z has no attribute )rKeyErrorwarningswarnDeprecationWarningAttributeError)r raliasesdeprecated_aliasesrpackages r __getattr__z lazy_import..__getattr__Gs""" 8T]FtVY7 7    "--- 8'-F MM)1TF.1"  tVY7 7   wwk1CD8LMMs %%A!! A-,A-r"c&tzzS)N)sorted) aliases_setdeprecated_aliases_set namespace_setsr__dir__zlazy_import..__dir__asmk14JJKKrr()r strreturnr)r*z Iterable[str])set) rrr r"r(r%r&r'r!s ``` @@@@rrr s0! NMg,K !34{*@,@@ *55K7KK 533I5II 3 #GNN0 +ImL#Iir)r r)rr)rdict[str, Any]r*r)NN)rr,rdict[str, str] | Noner r-r*None) __future__rrcollections.abcrtypingr__all__rrrrr4sU"$ /!.&*04D#D# "D#.D# D#r