L i `ddlmZddlZddlmZmZerddlmZdZ d dZ d dZ d dZ y) ) annotationsN) TYPE_CHECKINGAny) Collectionz~/.snowsql/configcJi}|D]}||vs|j|||<|S)aExtract the specified keys from source_dict and return them in a new dict. Parameters ---------- keys : Collection[str] The keys to extract from source_dict. source_dict : Dict[str, Any] The dict to extract keys from. Note that this function mutates source_dict. Returns ------- Dict[str, Any] A new dict containing the keys/values extracted from source_dict. )pop)keys source_dictdks `/mnt/ssd/data/python-lab/Trading/venv/lib/python3.12/site-packages/streamlit/connections/util.pyextract_from_dictr s9" A & ??1%AaD& Hctjjt}tjj |siSddl}|j d}|j|d||vr |d|}n d|vr|d}niS|jDcic]'\}}|jdd|jd )}}}d |vr |d |d <|d =|Scc}}w) z.Loads the dictionary from snowsql config file.rN#)inline_comment_prefixesz connections. connectionsname"dbdatabase) ospath expanduserSNOWSQL_CONNECTION_FILEexists configparser ConfigParserreaditemsreplacestrip)connection_namesnowsql_config_filerconfigraw_conn_paramsr v conn_paramss r load_from_snowsql_config_filer*:s'',,-DE 77>>- .   & &s & CF KK#$ o&'61 </@!AB &  / 9H8M8M8O041 &"qwws|+K {"-d"3 J   s,Cc< ddlm}|S#t$rYywxYw)z*Return whether this app is running in SiS.ris_in_stored_procedureF)"snowflake.snowpark._internal.utilsr-ModuleNotFoundErrorr,s r running_in_sisr0Xs) &'' s  )r zCollection[str]r dict[str, Any]returnr1)r$strr2r1)r2bool) __future__rrtypingrrcollections.abcrrrr*r0rr r9sC*# %*-  (6  4< r