U e@s@ddlmZddlZddlZddlmZGdddZdgZdS)) annotationsN) OrderedDictc@seZdZddddZeddZeddZed d Zd d Z d dZ ddddZ ddZ ddddZ ddZddddZdS)PyEnvCfgNone)returncCs||_||_dSN)contentpath)selfrr r I/opt/hc_python/lib/python3.8/site-packages/virtualenv/create/pyenv_cfg.py__init__ szPyEnvCfg.__init__cCs||dS)Nz pyvenv.cfg) from_file)clsfolderr r r from_folder szPyEnvCfg.from_foldercCs"|r||nt}t||Sr)exists _read_valuesrr)rr rr r r rszPyEnvCfg.from_filecCsVt}|jddD]:}|d}|d|}||dd}|||<q|S)Nutf-8encoding=)r read_text splitlinesindexstrip)r rlineZ equals_atkeyvaluer r r rs  zPyEnvCfg._read_valuescCstd|jd}|jD]R\}}|r@tj|r@tj|n|}|d|}td|||7}|d7}q|jj|dddS)Nzwrite %sz = z %s rr) loggingdebugr ritemsosrrealpath write_text)r textrrZnormalized_valuerr r r write s   zPyEnvCfg.writecCs||j|_|jSr)rr rr r r r refresh+szPyEnvCfg.refreshcCs||j|<dSrr)r rrr r r __setitem__/szPyEnvCfg.__setitem__cCs |j|Srr,)r rr r r __getitem__2szPyEnvCfg.__getitem__boolcCs ||jkSrr,)r itemr r r __contains__5szPyEnvCfg.__contains__cCs|j||Sr)rupdate)r otherr r r r28s zPyEnvCfg.updatestrcCs|jjd|jdS)Nz(path=)) __class____name__r r*r r r __repr__<szPyEnvCfg.__repr__N)r7 __module__ __qualname__r classmethodrr staticmethodrr)r+r-r.r1r2r8r r r r rs    r) __future__rr"r% collectionsrr__all__r r r r s  9