§
    fP„jWP  ã                   óF  — d Z ddlZddlZddlmZ 	 ddlZn# e$ r ddlZY nw xY wddlZddl	Z	ddl
mZmZmZmZmZmZmZ ddlmZ ddlmZ ddlmZ ddlZdd	lmZmZmZmZmZ  G d
„ de¦  «        Z g d¢Z!e! "                    d„ e!D ¦   «         dgz   ¦  «         dZ#d„ ej$         %                    dd¦  «         &                    d¦  «        D ¦   «         Z' G d„ de¦  «        Z(d„ Z)d„ Z*d„ Z+d$dej        e,ef         de,fd„Z-d%d„Z.de/e,         fd„Z0d%d„Z1d „ Z2d!„ Z3d$d"„Z4d#„ Z5dS )&z*Find and read Jupytext configuration filesé    N)ÚPath)ÚBoolÚDictÚEnumÚFloatÚListÚUnicodeÚUnion)ÚConfigurable)ÚPyFileConfigLoader)Ú
TraitErroré   )ÚNOTEBOOK_EXTENSIONSÚ"get_formats_from_notebook_metadataÚlong_form_multiple_formatsÚlong_form_one_formatÚshort_form_multiple_formatsc                   ó   — e Zd ZdZdS )ÚJupytextConfigurationErrorz>Error in the specification of the format for the text notebookN)Ú__name__Ú
__module__Ú__qualname__Ú__doc__© ó    úT/root/disk_3tb/conda_envs/Huy-visual/lib/python3.11/site-packages/jupytext/config.pyr   r      s   € € € € € ØHÐHÐHÐHr   r   )Újupytextzjupytext.tomlzjupytext.ymlzjupytext.yamlzjupytext.jsonc                 ó   — g | ]}d |z   ‘ŒS )ú.r   )Ú.0Úfilenames     r   ú
<listcomp>r"   )   s   € ÐSÐSÐS°˜c H™nÐSÐSÐSr   z.jupytext.pyzpyproject.tomlc                 ó   — g | ]}|¯|‘ŒS r   r   )r    Úpaths     r   r"   r"   -   s   € ÐwÐwÐw¨ÐrvÐw ÐwÐwÐwr   ÚJUPYTEXT_CEILING_DIRECTORIESÚ ú:c            
       óT  — e Zd ZdZ e e¦   «          e e¦   «         ¦  «         e e e¦   «         ¦  «        ¦  «         e e¦   «         ¦  «        gdd¬¦  «        Z edd¬¦  «        Z	 edd¬¦  «        Z
 edd¬¦  «        Z edd¬¦  «        Z ed	d
d¬¦  «        Z eddgddd¬¦  «        Z eddd¬¦  «        Z edd¬¦  «        Z edd¬¦  «        Z ed	dd¬¦  «        Z eddgddd¬¦  «        Z eddd¬¦  «        Z eddd¬¦  «        Z eddd¬¦  «        Z eddd¬¦  «        Z eg d¢ddd¬¦  «        Z edd¬¦  «        Z edd¬¦  «        Z e e e¦   «         e¦  «         e¦   «         gdd¬¦  «        Z edd¬¦  «        Z  ed d¬¦  «        Z!d%d!„Z"d"„ Z#d#„ Z$d$S )&ÚJupytextConfigurationz Jupytext Configuration's optionsac  Save notebooks to these file extensions. Can be any of ipynb,Rmd,md,jl,py,R,nb.jl,nb.py,nb.R comma separated. If you want another format than the default one, append the format name to the extension, e.g. ipynb,py:percent to save the notebook to hydrogen/spyder/vscode compatible scripts. Can also be a list of format dictionaries for first-match pairing.T)ÚhelpÚconfigz!Deprecated. Use 'formats' insteadzóPreferred format when saving notebooks as text, per extension. Use "jl:percent,py:percent,R:percent" if you want to save Julia, Python and R scripts in the double percent format and only write "jupytext_formats": "py" in the notebook metadata.z“Preferred format when reading notebooks from text, per extension. Use "py:sphinx" if you want to read all python scripts as Sphinx gallery scripts.zˆNotebook metadata that should be save in the text representations. Examples: 'all', '-all', 'widgets,nteract', 'kernelspec,jupytext-all'r&   z2Deprecated. Use 'notebook_metadata_filter' insteadFzTShould the notebook metadata be wrapped into an HTML comment in the Markdown format?)ÚvaluesÚ
allow_noner*   r+   z¹Should the root level metadata of text documents (like the fields 'title' or 'author' in R Markdown document) appear as a raw cell in the notebook (True), or go to the notebookmetadata?z‡Notebook metadata that should be promoted to the root level in the text representations. Examples: 'all', '-all', 'kernelspec,jupytext'ziCell metadata that should be saved in the text representations. Examples: 'all', 'hide_input,hide_output'z.Deprecated. Use 'cell_metadata_filter' insteadzJShould Jupyter magic commands be commented out in the text representation?zGSplit markdown cells on headings (Markdown and R Markdown formats only)zNWhen opening a Sphinx Gallery script, convert the reStructuredText to markdownzeShould equation markers use the DOxygen format? (see https://github.com/jupytext/jupytext/issues/517)g      ð?z¾Refuse to overwrite inputs of a ipynb notebooks with those of a text notebook when the text notebook plus margin is older than the ipynb notebook (NB: This option is ignored by Jupytext CLI))ÚwarningÚinfoÚinfo_if_changedÚdebugÚnoner0   zCThe log level for config file logs in the Jupytext contents manager)r,   Údefault_valuer*   r+   z·Start and end cell markers for the light format, comma separated. Use "{{{,}}}" to mark cellsas foldable regions in Vim, and "region,endregion" to mark cells as Vscode/PyCharm regionsz&Deprecated. Use 'cell_markers' insteadzA list of notebook extensionszàA comma separated list of cell magics. Use e.g. custom_cell_magics = "configure,local" if you want code cells starting with the Spark magic cell commands "configure" and "local" to be commented out when converted to scripts.zÿA comma separated list of additional language magics. Use e.g. custom_language_magics = "jsx,tsx" if you have custom magics for those languages and want Markdown code blocks in those languages to be converted to code cells with the appropriate cell magic.c                 ó®  — | j         r5t          j        dt          ¦  «         |                     d| j         ¦  «         | j        r|                     d| j        ¦  «         | j        r5t          j        dt          ¦  «         |                     d| j        ¦  «         | j        r|                     d| j        ¦  «         | j        r|                     d| j        ¦  «         | j	        �|                     d| j	        ¦  «         | j
        du r|                     d	| j
        ¦  «         | j        �|                     d
| j        ¦  «         | j        r|                     d| j        ¦  «         | j        r|                     d| j        ¦  «         |s^| j        r5t          j        dt          ¦  «         |                     d| j        ¦  «         | j        r|                     d| j        ¦  «         |r"| j        r|                     d| j        ¦  «         | j        r|                     d| j        ¦  «         | j        r|                     d| j        ¦  «         dS dS )zSet default format optionzkThe option 'default_notebook_metadata_filter' is deprecated. Please use 'notebook_metadata_filter' instead.Únotebook_metadata_filterzcThe option 'default_cell_metadata_filter' is deprecated. Please use 'cell_metadata_filter' instead.Úcell_metadata_filterÚroot_level_metadata_filterNÚhide_notebook_metadataFÚroot_level_metadata_as_raw_cellÚcomment_magicsÚsplit_at_headingÚdoxygen_equation_markerszSThe option 'default_cell_markers' is deprecated. Please use 'cell_markers' instead.Úcell_markersÚrst2mdÚcustom_cell_magicsÚcustom_language_magics)Ú default_notebook_metadata_filterÚwarningsÚwarnÚFutureWarningÚ
setdefaultr5   Údefault_cell_metadata_filterr7   r6   r8   r9   r:   r;   r<   Údefault_cell_markersr=   Úsphinx_convert_rst2mdr?   r@   )ÚselfÚformat_optionsÚreads      r   Úset_default_format_optionsz0JupytextConfiguration.set_default_format_options¸   s¬  € àÔ0ð 	iÝŒMØ}Ýñô ð ð ×%Ò%Ð&@À$ÔBgÑhÔhÐhØÔ(ð 	aØ×%Ò%Ð&@À$ÔB_Ñ`Ô`Ð`ØÔ,ð 	aÝŒMØuÝñô ð ð ×%Ò%Ð&<¸dÔ>_Ñ`Ô`Ð`ØÔ*ð 	eØ×%Ò%Ð&BÀDÔDcÑdÔdÐdØÔ$ð 	YØ×%Ò%Ð&<¸dÔ>WÑXÔXÐXØÔ&Ð2Ø×%Ò%Ð&>ÀÔ@[Ñ\Ô\Ð\ØÔ/°5Ð8Ð8Ø×%Ò%Ð&GÈÔImÑnÔnÐnØÔÐ*Ø×%Ò%Ð&6¸Ô8KÑLÔLÐLØÔ ð 	QØ×%Ò%Ð&8¸$Ô:OÑPÔPÐPØÔ(ð 	aØ×%Ò%Ð&@À$ÔB_Ñ`Ô`Ð`Øð 	MØÔ(ð UÝ”ØiÝ!ñô ð ð ×)Ò)¨.¸$Ô:SÑTÔTÐTØÔ ð MØ×)Ò)¨.¸$Ô:KÑLÔLÐLØð 	L�DÔ.ð 	LØ×%Ò% h°Ô0JÑKÔKÐKØÔ"ð 	UØ×%Ò%Ð&:¸DÔ<SÑTÔTÐTØÔ&ð 	]Ø×%Ò%Ð&>ÀÔ@[Ñ\Ô\Ð\Ð\Ð\ð	]ð 	]r   c                 óò   — ddl m}m} | j        rt	          j        dt          ¦  «         t          | j        p| j        ¦  «        D ]1}t          |¦  «        D ]}	  |||¦  «         |c c S # |$ r Y Œw xY wŒ2dS )zBReturn the default formats, if they apply to the current path #157r   )ÚInconsistentPathÚ	base_pathzRThe option 'default_jupytext_formats' is deprecated. Please use 'formats' instead.N)
Úpaired_pathsrN   rO   Údefault_jupytext_formatsrB   rC   rD   Únormalize_formatsÚformatsr   )rI   r$   rN   rO   Úpaired_formatsÚfmts         r   Údefault_formatsz%JupytextConfiguration.default_formatsæ   sÎ   € à=Ð=Ð=Ð=Ð=Ð=Ð=Ð=àÔ(ð 	ÝŒMØdÝñô ð õ 0°´Ð0]ÀÔ@]Ñ^Ô^ð 	ð 	ˆNå1°.ÑAÔAð ð �ðØ�I˜d CÑ(Ô(Ð(Ø)Ð)Ð)Ð)Ð)Ð)øØ'ð ð ð Ø�Hðøøøð	ð ˆts   ÁA+Á+A3Á2A3c                 ó~   — |                       ¦   «         D ]'}t          | |¦  «        t          ||¦  «        k    r dS Œ(dS )NFT)Úclass_trait_namesÚgetattr)rI   ÚotherÚkeys      r   Ú__eq__zJupytextConfiguration.__eq__û   sO   € Ø×)Ò)Ñ+Ô+ð 	ð 	ˆCÝ�t˜SÑ!Ô!¥W¨U°CÑ%8Ô%8Ò8Ð8Ø�u�uð 9ð ˆtr   N)F)%r   r   r   r   r
   r	   r   r   rS   rQ   Úpreferred_jupytext_formats_saveÚpreferred_jupytext_formats_readr5   rA   r   r8   r   r9   r7   r6   rF   r:   r;   rH   r<   r   Úoutdated_text_notebook_marginÚcm_config_log_levelr=   rG   r   Únotebook_extensionsr?   r@   rL   rV   r\   r   r   r   r)   r)   0   s—  € € € € € Ø*Ð*àˆeØ	ˆ‰Œ�D�D˜˜™œ‘O”O T T¨$¨$¨w¨w©y¬y©/¬/Ñ%:Ô%:¸D¸DÀÀÁÄ¹O¼OÐLðMð ð
ñ 
ô 
€Gð  '˜wÐ,OÐX\Ð]Ñ]Ô]Ðà&- gðHð ð'ñ 'ô 'Ð#ð '. gð-ð ð	'ñ 'ô 'Ð#ð  '˜wðPàð ñ  ô  Ðð (/ w¨rÐ8lÐuyÐ'zÑ'zÔ'zÐ$à!˜TØ�eˆ}ØØcØð	ñ ô Ðð '+ dØðð ð'ñ 'ô 'Ð#ð ") ð9àð"ñ "ô "Ðð #˜7ØxØðñ ô Ðð
 $+ 7¨2Ð4dÐmqÐ#rÑ#rÔ#rÐ à�TØ�eˆ}ØØYØð	ñ ô €Nð �tØØVØðñ ô Ðð !˜DØØ]Øðñ ô Ðð  $˜tØØtØð ñ  ô  Ðð %* EØðJð ð%ñ %ô %Ð!ð ˜$ØFÐFÐFØ'ØRØð	ñ ô Ðð �7ðeàðñ ô €Lð #˜7Ð(PÐY]Ð^Ñ^Ô^Ðà˜%Ø	ˆˆgˆg‰iŒiÐ,Ñ	-Ô	-¨w¨w©y¬yÐ9Ø,Øðñ ô Ðð !˜ð9ð ð	ñ ô Ðð %˜Wð+ð ðñ ô Ðð,]ð ,]ð ,]ð ,]ð\ð ð ð*ð ð ð ð r   r)   c                 óÖ  — t          | ¦  «        } d| v r| S t          |¦  «        D ]Ã}| d         |d         k    s|d         dk    r£| d         dvr™|                      d¦  «        |                     d|                      d¦  «        ¦  «        k    rY|                      d¦  «        |                     d|                      d¦  «        ¦  «        k    r|                     | ¦  «         |c S ŒÄ| S )z3Return the preferred format for the given extensionÚformat_nameÚ	extensionz.auto)z.mdz	.markdownz.Rmdz.ipynbÚsuffixÚprefix)r   r   ÚgetÚupdate)Úincomplete_formatÚpreferred_formatsrU   s      r   Úpreferred_formatrk     s  € å,Ð->Ñ?Ô?ÐØÐ)Ð)Ð)Ø Ð å)Ð*;Ñ<Ô<ð ð ˆð " +Ô.°#°kÔ2BÒBÐBà˜Ô$¨Ò/Ð/Ø)¨+Ô6Ð>dÐdÐdð "×%Ò% hÑ/Ô/°3·7²7¸8ÐEV×EZÒEZÐ[cÑEdÔEdÑ3eÔ3eÒeÐeØ!×%Ò% hÑ/Ô/°3·7²7¸8ÐEV×EZÒEZÐ[cÑEdÔEdÑ3eÔ3eÒeÐeà�JŠJÐ(Ñ)Ô)Ð)ØˆJˆJˆJøàÐr   c               #   ón  K  — g } dt           j        v r9|                      t           j        d                              d¦  «        ¦  «         nªdt           j        v r&|                      t           j        d         ¦  «         nvdt           j        v rh|                      t           j                             t           j        d         d¦  «        ¦  «         |                      t           j        d         ¦  «         dt           j        v r9|                      t           j        d                              d¦  «        ¦  «         nKdt           j        v r&|                      t           j        d         ¦  «         n|                      dd	g¦  «         | D ]*}t           j                             |d
¦  «        |gE d{V —† Œ+dS )zMReturn the directories in which Jupytext will search for a configuration fileÚXDG_CONFIG_HOMEr'   ÚUSERPROFILEÚHOMEz.configÚXDG_CONFIG_DIRSÚALLUSERSPROFILEz/usr/local/share/z/usr/share/r   N)ÚosÚenvironÚextendÚsplitÚappendr$   Újoin)Úconfig_dirsÚ
config_dirs     r   Ú)global_jupytext_configuration_directoriesrz     s¡  è è € ð €Kà�BœJÐ&Ð&Ø×Ò�2œ:Ð&7Ô8×>Ò>¸sÑCÔCÑDÔDÐDÐDØ	�"œ*Ð	$Ð	$Ø×Ò�2œ: mÔ4Ñ5Ô5Ð5Ð5Ø	•2”:Ð	Ð	Ø×Ò�2œ7Ÿ<š<­¬
°6Ô(:¸IÑFÔFÑGÔGÐGØ×Ò�2œ: fÔ-Ñ.Ô.Ð.à�BœJÐ&Ð&Ø×Ò�2œ:Ð&7Ô8×>Ò>¸sÑCÔCÑDÔDÐDÐDØ	�bœjÐ	(Ð	(Ø×Ò�2œ:Ð&7Ô8Ñ9Ô9Ð9Ð9à×ÒÐ/°Ð?Ñ@Ô@Ð@à!ð 
ð 
ˆ
åŒG�LŠL˜ ZÑ0Ô0Øð
ð 	
ð 	
ð 	
ð 	
ð 	
ð 	
ð 	
ð 	
ð
ð 
r   c                  óT   — t          ¦   «         D ]} t          | d¦  «        }|r|c S ŒdS )z5Return the global Jupytext configuration file, if anyFN)rz   Ú find_jupytext_configuration_file)ry   Úconfig_files     r   Ú'find_global_jupytext_configuration_filer~   6  sI   € õ @ÑAÔAð ð ˆ
Ý6°zÀ5ÑIÔIˆØð 	ØÐÐÐð	ð ˆ4r   Tr$   Úreturnc                 óœ  — t          | ¦  «                             ¦   «         } |                      ¦   «         r4t          D ],}| |z  }|                     ¦   «         rt          |¦  «        c S Œ-| t          z  }|                     ¦   «         r—|                     ¦   «         5 }t          j	        | 
                    ¦   «         ¦  «        }|                     di ¦  «                             d¦  «        �t          |¦  «        cddd¦  «         S 	 ddd¦  «         n# 1 swxY w Y   |sdS t          ry|                      ¦   «         ret          D ]]}t          |¦  «                             ¦   «         r:|                      ¦   «         t          |¦  «                             ¦   «         k    r dS Œ^| j        }|| k    rt          ¦   «         S t          |d¦  «        S )z^Return the first jupytext configuration file in the current directory, or any parent directoryÚtoolr   NT)r   ÚabsoluteÚis_dirÚJUPYTEXT_CONFIG_FILESÚis_fileÚstrÚPYPROJECT_FILEÚopenÚtomllibÚloadsrK   rg   r%   Úparentr~   r|   )	r$   Úsearch_parent_dirsr!   Ú	full_pathÚpyproject_pathÚstreamÚdocÚceiling_dirÚ
parent_dirs	            r   r|   r|   A  s  € õ �‰:Œ:×ÒÑ Ô €Dà‡{‚{�}„}ð &Ý-ð 	&ð 	&ˆHØ˜x™ˆIØ× Ò Ñ"Ô"ð &Ý˜9‘~”~Ð%Ð%Ð%ð&ð �NÑ*€NØ×ÒÑÔð +Ø× Ò Ñ"Ô"ð 	+ fÝ”- §¢¡¤Ñ.Ô.ˆCØ�wŠw�v˜rÑ"Ô"×&Ò& zÑ2Ô2Ð>Ý˜>Ñ*Ô*ð	+ð 	+ð 	+ð 	+ñ 	+ô 	+ð 	+ð 	+à>ð	+ð 	+ð 	+ñ 	+ô 	+ð 	+ð 	+ð 	+ð 	+ð 	+ð 	+øøøð 	+ð 	+ð 	+ð 	+ð
 ð Øˆtå#ð ¨¯ª©¬ð Ý7ð 	ð 	ˆKÝ�KÑ Ô ×'Ò'Ñ)Ô)ð ¨d¯mªm©o¬oÅÀkÑARÔAR×A[ÒA[ÑA]ÔA]Ò.]Ð.]Ø�t�tøà”€JØ�TÒÐÝ6Ñ8Ô8Ð8å+¨J¸Ñ=Ô=Ð=s   ÂADÄDÄDc                 ó°  — |                       d¦  «        sM|€Kt          | d¬¦  «        5 }t          | |                     ¦   «         ¦  «        cddd¦  «         S # 1 swxY w Y   	 |                       d¦  «        r>t	          j        |¦  «        }|                       t          ¦  «        r|d         d         S |S |                       d¦  «        rt          j        |¦  «        S |                       d	¦  «        rt          j        |¦  «        S t          | ¦  «                             ¦   «         S # t          t          f$ r}t          d
| › d|› �¦  «        ‚d}~ww xY w)z.Read a Jupytext config file, and return a dictz.pyNzutf-8)Úencoding)z.tomlr   r�   r   )z.ymlz.yamlz.jsonú The Jupytext configuration file ú is incorrect: )Úendswithrˆ   Ú!parse_jupytext_configuration_filerK   r‰   rŠ   r‡   ÚyamlÚ	safe_loadÚjsonr   Úload_configÚ
ValueErrorÚ	NameErrorr   )Újupytext_config_filer�   r�   Úerrs       r   r˜   r˜   b  s¶  € à×(Ò(¨Ñ/Ô/ð Z°F°NÝÐ&°Ð9Ñ9Ô9ð 	Z¸VÝ4Ð5IÈ6Ï;Ê;É=Ì=ÑYÔYð	Zð 	Zð 	Zð 	Zñ 	Zô 	Zð 	Zð 	Zð 	Zð 	Zð 	Zð 	Zøøøð 	Zð 	Zð 	Zð 	ZðxØ×(Ò(Ð)>Ñ?Ô?ð 	Ý”- Ñ'Ô'ˆCØ#×,Ò,­^Ñ<Ô<ð Ø˜6”{ :Ô.Ð.à�
à×(Ò(Ð):Ñ;Ô;ð 	*Ý”> &Ñ)Ô)Ð)à×(Ò(¨Ñ1Ô1ð 	&Ý”:˜fÑ%Ô%Ð%å!Ð"6Ñ7Ô7×CÒCÑEÔEÐEøÝ�	Ð"ð xð xð xÝ(Ð)vÐL`Ð)vÐ)vÐqtÐ)vÐ)vÑwÔwÐwøøøøðxøøøsB   ©"AÁAÁAÁ$AD* Â5D* Â7(D* Ã (D* Ä	 D* Ä*EÄ;EÅEc           	      ój  — t          | t          ¦  «        r|                      d¦  «        } nXt          | t          ¦  «        r| g} n?| €g } n:t          | t          ¦  «        s%t          dt          | ¦  «        j        › d�¦  «        ‚g }| D ]ª}t          |t          ¦  «        r|                     |¦  «         Œ-t          |t          ¦  «        rAd„ | 	                    ¦   «         D ¦   «         }|                     t          |¦  «        ¦  «         Œƒt          d|› dt          |¦  «        j        › d�¦  «        ‚|S )	zINormalize the formats option into a list of string-encoded paired formatsú;NzInvalid type for 'formats': z*. Expected str, dict, list of str or dict.c                 ój   — g | ]0\  }}|s|n&|                      d ¦  «        r
|dd…         n|dz   |z   ‘Œ1S )ú/Néÿÿÿÿz///)r—   )r    rf   Úfs      r   r"   z%normalize_formats.<locals>.<listcomp>“  s_   € ð ð ð á�F˜Að !Ðc��°f·o²oÀcÑ6JÔ6JÐ'V v¨c¨r¨c¤{ {ÐPVÐZ_Ñ&_ÐbcÑ&cðð ð r   zInvalid paired formats: z. Expected str or dict, got r   )Ú
isinstancer†   ru   ÚdictÚlistr   Útyper   rv   Úitemsr   )rS   Ústring_encoded_pairing_formatsrT   s      r   rR   rR   {  sf  € õ �'�3ÑÔð 
à—-’- Ñ$Ô$ˆˆÝ	�G�TÑ	"Ô	"ð 
à�)ˆˆØ	ˆØˆˆÝ˜¥Ñ&Ô&ð 
Ý(Øm­4°©=¬=Ô+AÐmÐmÐmñ
ô 
ð 	
ð
 &(Ð"à!ð ð ˆÝ�n¥cÑ*Ô*ð 	Ø*×1Ò1°.ÑAÔAÐAÐAÝ˜­Ñ-Ô-ð 
	ðð à!/×!5Ò!5Ñ!7Ô!7ðñ ô ˆNð +×1Ò1Õ2MÈnÑ2]Ô2]Ñ^Ô^Ð^Ð^å,Øw¨>ÐwÐwÕW[Ð\jÑWkÔWkÔWtÐwÐwÐwñô ð ð *Ð)r   c                 óø   — t          | |¦  «        }t          | |¦  «        }t          |j        p|j        ¦  «        |_        t          |j        t          ¦  «        r|j                             d¦  «        |_        |S )zZRead and validate a Jupytext configuration file, and return a JupytextConfiguration objectú,)	r˜   Ú$validate_jupytext_configuration_filerR   rS   rQ   r§   ra   r†   ru   )r}   r�   Úconfig_dictr+   s       r   Ú load_jupytext_configuration_filer±      sm   € å3°KÀÑHÔH€KÝ1°+¸{ÑKÔK€FÝ& v¤~Ð'X¸Ô9XÑYÔY€F„Nå�&Ô,­cÑ2Ô2ð KØ%+Ô%?×%EÒ%EÀcÑ%JÔ%JˆÔ"Ø€Mr   c                 óæ   — t          | ¦  «        }|€dS t          j                             | ¦  «        r"t          j                             || ¦  «        rdS t          | ¦  «        }t          |¦  «        S )zmReturn the jupytext configuration file in the same folder, or in a parent folder, of the current file, if anyN)r|   rr   r$   ÚisfileÚsamefiler±   )Únb_filer}   s     r   Úload_jupytext_configr¶   «  si   € å2°7Ñ;Ô;€KØÐØˆtÝ	„w‡~‚~�gÑÔð ¥2¤7×#3Ò#3°KÀÑ#IÔ#Ið ØˆtÝ2°7Ñ;Ô;€KÝ+¨KÑ8Ô8Ð8r   c                 óx  — |€dS 	 t          di |¤Ž}n'# t          $ r}t          d| › d|› �¦  «        ‚d}~ww xY wt          |¦  «                             t          t          ¦   «         ¦  «        ¦  «        }t          |¦  «        r6t          d                     | d                     |¦  «        ¦  «        ¦  «        ‚|S )z;Turn a dict-like config into a JupytextConfiguration objectNr•   r–   zMThe Jupytext configuration file {} is incorrect: options {} are not supportedr®   r   )	r)   r   r   ÚsetÚ
differenceÚdirÚanyÚformatrw   )r}   r°   r+   r    Úinvalid_optionss        r   r¯   r¯   ¶  sâ   € àÐØˆtðoÝ&Ð5Ð5¨Ð5Ð5ˆˆøÝð oð oð oÝ(Ð)mÈKÐ)mÐ)mÐhkÐ)mÐ)mÑnÔnÐnøøøøðoøøøå˜+Ñ&Ô&×1Ò1µ#Õ6KÑ6MÔ6MÑ2NÔ2NÑOÔO€OÝ
ˆ?ÑÔð 
Ý(Ø[×bÒbØ˜SŸXšX oÑ6Ô6ñô ñ
ô 
ð 	
ð
 €Ms   † “
7�2²7c                 ó  ‡‡— |                       d¦  «        }|                      di ¦  «        }|                      d¦  «        p|                      d¦  «        }|rt          ||d¬¦  «        }n‰r}|                      ddt          j                             |¦  «        d	         i¦  «        Št          ‰                     |¦  «        |d¬¦  «        }t          ˆfd
„|D ¦   «         ¦  «        r|}|sŒ|sdS |                      di ¦  «        }t          j                             |¦  «        d	         }	d|	i}
|	|                      d¦  «        k    r-|                      d¦  «        r|                      d¦  «        |
d<   |
g}‰rˆfd„|D ¦   «         }|S )z3Return the list of formats for the current notebookÚmetadatar   rS   Újupytext_formatsF)Úauto_ext_requires_language_infoÚtext_representationrd   r   c              3   ó¤   •K  — | ]J}‰                      d ¦  «        |d          k    o&d|vp"d‰vp‰d         |                      d¦  «        k    V — ŒKdS )rd   rc   N)rg   )r    rU   Úcurrent_formats     €r   ú	<genexpr>z#notebook_formats.<locals>.<genexpr>Ø  s‹   øè è € ð 
ð 
ð ð ×Ò˜{Ñ+Ô+¨s°;Ô/?Ò?ð à SÐ(ð KØ ¨Ð6ðKà! -Ô0°C·G²G¸MÑ4JÔ4JÒJð
ð 
ð 
ð 
ð 
ð 
r   Nrc   c                 ó:   •— g | ]}t          |‰j        ¦  «        ‘ŒS r   )rk   r]   )r    r¦   r+   s     €r   r"   z$notebook_formats.<locals>.<listcomp>ñ  s(   ø€ Ð`Ð`Ð`ÐSTÕ# A vÔ'MÑNÔNÐ`Ð`Ð`r   )rg   r   rr   r$   ÚsplitextrV   r»   )Únbkr+   r$   Úfallback_on_current_fmtr¿   Újupytext_metadatarS   rV   Ú	text_reprÚextrU   rÄ   s    `         @r   Únotebook_formatsrÍ   È  sÕ  øø€ à�wŠw�zÑ"Ô"€HØ Ÿš Z°Ñ4Ô4ÐØ×#Ò# IÑ.Ô.ÐR°(·,²,Ð?QÑ2RÔ2R€Gàð &Ý,¨W°hÐ`eÐfÑfÔfˆˆØ	ð &Ø*×.Ò.Ð/DÀ{ÕTVÔT[×TdÒTdÐeiÑTjÔTjÐklÔTmÐFnÑoÔoˆÝ4Ø×"Ò" 4Ñ(Ô(ØØ,1ð
ñ 
ô 
ˆõ ð 
ð 
ð 
ð 
ð 'ð
ñ 
ô 
ñ 
ô 
ð 		&ð &ˆGàð 
Ø&ð 	Ø�4Ø%×)Ò)Ð*?ÀÑDÔDˆ	ÝŒg×Ò˜tÑ$Ô$ QÔ'ˆØ˜CÐ ˆà�)—-’- Ñ,Ô,Ò,Ð,°·²¸}Ñ1MÔ1MÐ,Ø!*§¢¨}Ñ!=Ô!=ˆC�Ñà�%ˆð ð aØ`Ð`Ð`Ð`ÐX_Ð`Ñ`Ô`ˆà€Nr   c                 ód   — t          | ¦  «        }|rt          |¦  «        S t          | ||¦  «        S )aW  
    Get the notebook formats from notebook metadata or config.

    Notebook metadata takes precedence over config. If the notebook metadata contains pairing information,
    it is used; otherwise, the configuration is used as a fallback.

    Parameters
    ----------
    notebook : dict
        The notebook object (as a dictionary).
    config : JupytextConfiguration or None
        The Jupytext configuration object.
    nb_file : str
        The path to the notebook file.

    Returns
    -------
    list
        A list of format dictionaries describing the notebook's paired formats.
    )r   r   rÍ   )Únotebookr+   rµ   rS   s       r   Ú$get_formats_from_notebook_and_configrÐ   ö  s9   € õ* 1°Ñ:Ô:€GØð ;Ý)¨'Ñ2Ô2Ð2å ¨&°'Ñ:Ô:Ð:r   )T)N)6r   r›   rr   Úpathlibr   r‰   ÚImportErrorÚtomlirB   r™   Ú	traitletsr   r   r   r   r   r	   r
   Útraitlets.configr   Útraitlets.config.loaderr   Útraitlets.traitletsr   ÚtypingrS   r   r   r   r   r   r�   r   r„   rt   r‡   rs   rg   ru   r%   r)   rk   rz   r~   r†   r|   r˜   r©   rR   r±   r¶   r¯   rÍ   rÐ   r   r   r   ú<module>rÙ      s  ðØ 0Ð 0à €€€Ø 	€	€	€	Ø Ð Ð Ð Ð Ð ðØ€N€N€N€NøØð ð ð ØÐÐÐÐÐðøøøð €€€à €€€Ø CÐ CÐ CÐ CÐ CÐ CÐ CÐ CÐ CÐ CÐ CÐ CÐ CÐ CÐ CÐ CÐ CÐ CØ )Ð )Ð )Ð )Ð )Ð )Ø 6Ð 6Ð 6Ð 6Ð 6Ð 6Ø *Ð *Ð *Ð *Ð *Ð *Ø €€€ðð ð ð ð ð ð ð ð ð ð ð ð ð ðIð Ið Ið Ið I ñ Iô Ið Iðð ð Ð ð × Ò ÐSÐSÐ=RÐSÑSÔSÐWeÐVfÑfÑ gÔ gÐ gà!€àwÐw°´·²Ð@^Ð`bÑ1cÔ1c×1iÒ1iÐjmÑ1nÔ1nÐwÑwÔwÐ ðPð Pð Pð Pð P˜Lñ Pô Pð Pðfð ð ð0
ð 
ð 
ð6ð ð ð>ð >¨6¬<¸¸T¸	Ô+Bð >Ð`cð >ð >ð >ð >ðBxð xð xð xð2"* $ s¤)ð "*ð "*ð "*ð "*ðJð ð ð ð9ð 9ð 9ðð ð ð$+ð +ð +ð +ð\;ð ;ð ;ð ;ð ;s   ’ —	#¢#