ó
    Ð]j·W  ã                  óÜ  • S r SSKJr  SSKrSSKrSSKJr  SSKJ	r	  SSK
JrJrJrJrJrJrJrJrJrJr  SSKJr  SSKJr  SS	KJrJr  S
SKJrJrJrJ r   \RB                  (       a3  \RD                  \RF                  \RH                  \R                     4   r%O\R                  r% " S S\&5      r' " S S\'5      r( " S S\5      r) " S S\)5      r*\RV                  " SSS9r, " S S\*5      r-g)z/A base class for objects that are configurable.é    )ÚannotationsN)Údeepcopy)Údedent)
ÚAnyÚ	ContainerÚDictÚ	HasTraitsÚInstanceÚ	TraitTypeÚdefaultÚobserveÚobserve_compatÚvalidate)Úwarnings)ÚBunch)ÚindentÚwrap_paragraphsé   )ÚConfigÚDeferredConfigÚLazyConfigValueÚ_is_section_keyc                  ó   • \ rS rSrSrg)ÚConfigurableErroré(   © N©Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__static_attributes__r   ó    ÚZ/home/mande/repo/quber/.venv/lib/python3.13/site-packages/traitlets/config/configurable.pyr   r   (   ó   † Úr#   r   c                  ó   • \ rS rSrSrg)ÚMultipleInstanceErroré,   r   Nr   r   r#   r$   r'   r'   ,   r%   r#   r'   c                  óf  ^ • \ rS rSr\" \S0 5      r\" SSS9rSU 4S jjr\	SS j5       r
SS jr  S       SS	 jjr\" S
5      \SS j5       5       rSS jr\	SSS jj5       r\	  S       SS jj5       r\	SSS jj5       r\	      SS j5       r\	SS S jj5       r\	S!S j5       rSrU =r$ )"ÚConfigurableé5   r   z*traitlets.config.configurable.ConfigurableT)Ú
allow_nonec                ó¬  >^^• TR                  SS5      nUb(  TR                  SS5      c  UR                  TS'   X l        TR                  SS5      n[        TU ]  " S0 TD6  [        5       mSUU4S jjnU R                  U5        Ub  X0l        OU R                  U R                  5        U R                  U5        T H  n[        XTU   5        M     g)aì  Create a configurable given a config config.

Parameters
----------
config : Config
    If this is empty, default values are used. If config is a
    :class:`Config` instance, it will be used to configure the
    instance.
parent : Configurable instance, optional
    The parent Configurable instance of this object.

Notes
-----
Subclasses of Configurable must call the :meth:`__init__` method of
:class:`Configurable` *before* doing anything else and using
:func:`super`::

    class MyConfigurable(Configurable):
        def __init__(self, config=None):
            super(MyConfigurable, self).__init__(config=config)
            # Then any other code you need to finish initialization.

This ensures that instances will be configured properly.
ÚparentNÚconfigc                ó^   >• U R                   T;   a  TR                  U R                   5        gg)zjRecord traits set by both config and kwargs.

They will need to be overridden again after loading config.
N)ÚnameÚadd)ÚchangeÚconfig_override_namesÚkwargss    €€r$   Únotice_config_overrideÚ5Configurable.__init__.<locals>.notice_config_overridea   s(   ø€ ð
 �{‰{˜fÓ$Ø%×)Ñ)¨&¯+©+Õ6ð %r#   r   ©r3   r   ÚreturnÚNone)ÚpopÚgetr/   r.   ÚsuperÚ__init__Úsetr   Ú_load_configÚ	unobserveÚsetattr)Úselfr5   r.   r/   r6   r1   r4   Ú	__class__s    `    @€r$   r>   ÚConfigurable.__init__9   sÌ   ú€ ð2 —‘˜H dÓ+ˆØÑà�z‰z˜( DÓ)Ñ1Ø#)§=¡=��xÑ Ø ŒKà—‘˜H dÓ+ˆô 	‰ÒÑ"˜6Ò"ô !$£Ð÷	7ð 	7ð 	�‰Ð+Ô,ð Ñð !�Kð ×Ñ˜dŸk™kÔ*Ø�‰Ð-Ô.ã)ˆDÜ�D  t¡Ö-ò *r#   c                ó¾   • [        U R                  5       Vs/ s H8  n[        U[        5      (       d  M  [        X5      (       d  M,  UR                  PM:     sn$ s  snf )zreturn section names as a list)ÚreversedÚ__mro__Ú
issubclassr*   r   )ÚclsÚcs     r$   Úsection_namesÚConfigurable.section_names�   sO   € ô
 ˜cŸk™kÔ*ó
â*�Ü˜!œ\×*ó ä/9¸#×/Aó ˆA�JŒJÙ*ñ
ð 	
ùò 
s   ˜AµAÁAc                ó,  • U/nU R                   (       a*  UR                  U R                   R                  U5      5        [        5       nU HE  nU R	                  5        H.  nUR                  U5      (       d  M  UR                  XE   5        M0     MG     U$ )a‹  extract my config from a global Config object

will construct a Config object of only the config values that apply to me
based on my mro(), as well as those of my parent(s) if they exist.

If I am Bar and my parent is Foo, and their parent is Tim,
this will return merge following config sections, in this order::

    [Bar, Foo.Bar, Tim.Foo.Bar]

With the last item being the highest priority.
)r.   ÚappendÚ_find_my_configr   rL   Ú_has_sectionÚmerge)rC   ÚcfgÚcfgsÚ	my_configrK   Úsnames         r$   rP   ÚConfigurable._find_my_configŠ   sx   € ð ˆuˆØ�;�;Ø�K‰K˜Ÿ™×3Ñ3°CÓ8Ô9Ü“Hˆ	ÛˆAØ×+Ñ+Ö-�ð —>‘> %×(Ó(Ø—O‘O A¡HÖ-ó	 .ñ ð Ðr#   c           
     óÈ  • Uc  U R                  SS9nUc  U R                  5       nU R                  U5      nU R                  5          UR	                  5        GHm  u  pVXS;   aq  [        U[        5      (       a  [        X5      nUR                  U5      nO([        U[        5      (       a  UR                  X5   5      n[        X[        U5      5        M|  [        U5      (       a  MŽ  [        U[        5      (       a  M¥  SSKJn  [        U [         5      (       a&  U R"                  c   eU R"                  R$                  n	OSS jn	U" XS5      n
SU SU R&                  R(                   S	3n[+        U
5      S
:X  a  USU
S    S3-  nO9[+        U
5      S
:¼  a*  USR-                  SR/                  [1        U
5      5      S9-  nU	" U5        GMp     SSS5        g! , (       d  f       g= f)z load traits from a Config objectNT©r/   r   )Úget_close_matchesc                ó6   • [         R                  " U [        SS9$ )Né	   ©Ú
stacklevel)r   ÚwarnÚUserWarning)Úmsgs    r$   r_   Ú'Configurable._load_config.<locals>.warnÊ   s   € Ü#+§=¢=°´kÈaÑ#PÐPr#   zConfig option `z` not recognized by `z`.r   z  Did you mean `z`?z#  Did you mean one of: `{matches}`?ú, )Úmatches)ra   út.Anyr9   r:   )ÚtraitsrL   rP   Úhold_trait_notificationsÚitemsÚ
isinstancer   ÚgetattrÚ	get_valuer   rB   r   r   r   ÚdifflibrZ   ÚLoggingConfigurableÚlogÚwarningrD   r   ÚlenÚformatÚjoinÚsorted)rC   rS   rL   rf   rU   r1   Úconfig_valueÚinitialrZ   r_   rd   ra   s               r$   r@   ÚConfigurable._load_config£   s¬  € ð ‰>Ø—[‘[¨�[Ð-ˆFØÑ Ø ×.Ñ.Ó0ˆMà×(Ñ(¨Ó-ˆ	ð ×*Ñ*Õ,Ø&/§o¡o×&7Ñ"�Ø“>Ü! ,´×@Ñ@ô #*¨$Ó"5˜Ø'3×'=Ñ'=¸gÓ'F™Ü# L´.×AÑAà'3×'=Ñ'=¸f¹lÓ'K˜ô ˜D¬°Ó(>Ö?Ü(¨×.Ó.´zÀ,ÔPV×7WÓ7WÝ9ä! $Ô(;×<Ñ<Ø#Ÿx™xÑ3Ð3Ð3Ø#Ÿx™x×/Ñ/™ôQñ 0°Ó=�GØ+¨D¨6Ð1FÀtÇ~Á~×G^ÑG^ÐF_Ð_aÐb�Cä˜7“| qÓ(ØÐ!1°'¸!±*°¸RÐ@Ñ@™Ü˜W›¨Ó*ØÐD×KÑKØ$(§I¡I¬f°W«oÓ$>ð  Lð  ñ ˜ñ ˜—IñE '8÷ -×,Ö,ús   ÁBGÃ&GÃ=CGÇ
G!r/   c                óv   • U R                  SS9nU R                  5       nU R                  UR                  X#S9  g)zÒUpdate all the class traits having ``config=True`` in metadata.

For any class trait with a ``config`` metadata attribute that is
``True``, we update the trait with the value of the corresponding
config entry.
TrY   )rf   rL   N)rf   rL   r@   Únew)rC   r3   rf   rL   s       r$   Ú_config_changedÚConfigurable._config_changedØ   s;   € ð —‘ D�Ð)ˆð
 ×*Ñ*Ó,ˆØ×Ñ˜&Ÿ*™*¨VÐÒQr#   c                ó�   • [        U R                  5      U l        U R                  U5        U R                  R                  U5        g)z%Update config and load the new valuesN)r   r/   r@   rR   )rC   r/   s     r$   Úupdate_configÚConfigurable.update_configê   s4   € ô ˜tŸ{™{Ó+ˆŒà×Ñ˜&Ô!à�‰×Ñ˜&Õ!r#   c                óº  • Ub  [        X5      (       d   e/ nSR                  S U R                   5       5      nUR                  U R                   SU S35        UR                  [        US   5      S-  5        [        U R                  SS9R                  5       5       H'  u  pEU R                  XQ5      nUR                  U5        M)     S	R                  U5      $ )
zŠGet the help string for this class in ReST format.

If `inst` is given, its current trait values will be used in place of
class defaults.
rc   c              3  ó8   #   • U  H  oR                   v •  M     g 7f©N)r   ©Ú.0Úps     r$   Ú	<genexpr>Ú.Configurable.class_get_help.<locals>.<genexpr>  s   é € Ð C²]°§¦²]ùs   ‚Ú(z	) optionsr   Ú-TrY   Ú
)
ri   rr   Ú	__bases__rO   r   rp   rs   Úclass_traitsrh   Úclass_get_trait_help)rJ   ÚinstÚ
final_helpÚbase_classesÚ_ÚvÚhelps          r$   Úclass_get_helpÚConfigurable.class_get_helpú   sÉ   € ð ‰|œz¨$×4Ñ4Ð4Ð4Øˆ
Ø—y‘yÑ C°S·]²]Ó CÓCˆØ×Ñ˜SŸ\™\˜N¨!¨L¨>¸ÐCÔDØ×Ñœ#˜j¨™mÓ,¨sÑ2Ô3Ü˜3×+Ñ+°4Ð+Ð8×>Ñ>Ó@ÖA‰DˆAØ×+Ñ+¨AÓ4ˆDØ×Ñ˜dÖ#ñ Bð �y‰y˜Ó$Ð$r#   c           
     óN  • Ub  [        X 5      (       d   e/ nSU R                   SUR                   3n[        U[        [        45      (       as  UR
                  R                  SS5      n[        U[        5      (       a  SnO'SUR                  R                  R                  5       -  nUS:X  a	  U SU S	3nO%U S
U S	3nOU SUR                  R                   S3nUR                  U5        Uc  UR                  nUS:w  a5  SR                  [        US5      5      nUR                  [        U5      5        SUR                  R                  ;   a+  UR                  [        SUR                  5       -  5      5        Ub;  UR                  [        S[        X!R                  =(       d    S5      < 35      5        OH UR!                  5       nUb4  [%        U5      S:”  a  USS S	-   nUR                  [        SU-  5      5        SR                  U5      $ ! ["         a    Sn NVf = f)zäGet the helptext string for a single trait.

:param inst:
    If given, its current trait values will be used in place of
    the class default.
:param helptext:
    If not given, uses the `help` attribute of the current trait.
Nz--Ú.ÚmultiplicityrO   z<key-1>=<value-1>z<%s-item-1>Ú=ú...Ú z=<Ú>Ú ú

éL   ÚEnumzChoices: %sz	Current: é@   é=   zDefault: %srˆ   )ri   r   r1   r   r   Úmetadatar<   rD   ÚlowerrO   r‘   rr   r   r   Úinforj   Údefault_value_reprÚ	Exceptionrp   )	rJ   ÚtraitrŒ   ÚhelptextÚlinesÚheaderr–   Úsample_valueÚdvrs	            r$   r‹   Ú!Configurable.class_get_trait_help  së  € ð ‰|œz¨$×4Ñ4Ð4Ð4ØˆØ�c—l‘l�^ 1 U§Z¡Z LÐ1ˆÜ�eœi¬Ð.×/Ñ/Ø Ÿ>™>×-Ñ-¨n¸hÓGˆLÜ˜%¤×&Ñ&Ø2‘à,¨u¯©×/GÑ/G×/MÑ/MÓ/OÑO�Ø˜xÓ'Ø"˜8 1 \ N°#Ð6‘à"˜8 1 \ N°#Ð6‘à�x˜r %§/¡/×":Ñ":Ð!;¸1Ð=ˆFà�‰�VÔàÑØ—z‘zˆHØ�r‹>Ø—{‘{¤?°8¸RÓ#@ÓAˆHØ�L‰Lœ Ó)Ô*à�U—_‘_×-Ñ-Ó-à�L‰Lœ °·
±
³Ñ <Ó=Ô>àÑØ�L‰Lœ )¬G°D¿*¹*×:JÈÓ,KÑ+NÐ OÓPÕQðØ×.Ñ.Ó0�ð ‰Ü�s“8˜b“=Ø˜c˜r˜( UÑ*�CØ—‘œV M°CÑ$7Ó8Ô9à�y‰y˜ÓÐøô ó Ø’ðús   Æ=H ÈH$È#H$c                ó8   • [        U R                  U5      5        g)z4Get the help string for a single trait and print it.N)Úprintr’   )rJ   rŒ   s     r$   Úclass_print_helpÚConfigurable.class_print_helpD  s   € ô 	ˆc× Ñ  Ó&Õ'r#   c                óò   • U nUR                   c   eU R                  5        HQ  n[        U[        5      (       d  M  XB;   d  M!  UR	                  SS9R                  UR                   S5      UL d  MO  UnMS     U$ )aÏ  Get the class that defines a trait

For reducing redundant help output in config files.
Returns the current class if:
- the trait is defined on this class, or
- the class where it is defined would not be in the config file

Parameters
----------
trait : Trait
    The trait to look for
classes : list
    The list of other classes to consider for redundancy.
    Will return `cls` even if it is not defined on `cls`
    if the defining class is not in `classes`.
NTrY   )r1   ÚmrorI   r*   Úclass_own_traitsr<   )rJ   r¦   ÚclassesÚdefining_clsr.   s        r$   Ú_defining_classÚConfigurable._defining_classI  sq   € ð( ˆØ�z‰zÑ%Ð%Ð%Ø—g‘g–iˆFä˜6¤<×0Ó0ØÕ%Ø×+Ñ+°4Ð+Ð8×<Ñ<¸U¿Z¹ZÈÓNÐRWÔWà%’ñ  ð Ðr#   c           	     óˆ  • SS jnSnSR                  S U R                   5       5      nSU R                   SU S3nX5U/nU R                  5       R	                  S5      nU(       a  UR
                  nU(       d  [        U S	S
5      nU(       a(  UR                  U" U5      5        UR                  S
5        [        U R                  SS9R                  5       5       GHR  u  p‰U	R                  5       n
U(       a  U R                  X‘5      nOU nX°L a‚  U	R                  (       a!  UR                  U" U	R                  5      5        S[        U	5      R                  ;   a"  UR                  SU	R                  5       -  5        UR                  SU
-  5        OfU	R                  (       a4  UR                  U" U	R                  R                  SS5      S   5      5        UR                  SUR                   SU 35        UR                  SU R                   SU SU
 35        UR                  S
5        GMU     SR                  U5      $ )z³Get the config section for this class.

Parameters
----------
classes : list, optional
    The list of other classes in the config file.
    Used to reduce redundant information.
c                ób   • SR                  [        U S5      5      n SU R                  SS5      -   $ )z"return a commented, wrapped block.rœ   éN   z## rˆ   z
#  )rr   r   Úreplace)Úss    r$   rK   Ú,Configurable.class_config_section.<locals>.cs  s-   € à—‘œO¨A¨rÓ2Ó3ˆAà˜1Ÿ9™9 T¨7Ó3Ñ3Ð3r#   zO#------------------------------------------------------------------------------rc   c              3  óh   #   • U  H(  n[        U[        5      (       d  M  UR                  v •  M*     g 7fr€   )rI   r*   r   r�   s     r$   r„   Ú4Configurable.class_config_section.<locals>.<genexpr>{  s!   é € Ð"d²}°!Ì
ÐSTÔVb×Hc£: 1§:¦:²}ùs   ‚2Ÿ2z# r†   z) configurationÚdescriptionÚ__doc__r›   TrY   rž   z#  Choices: %sz#  Default: %srˆ   r   r   z#  See also: r•   z# c.z = )r¼   Ústrr9   rÂ   )rr   r‰   r   rŠ   r<   Údefault_valuerj   rO   rs   rh   r¤   r¶   r‘   Útyper£   Úsplit)rJ   r´   rK   ÚbreakerÚparent_classesr¼   r¨   Údescr1   r¦   Údefault_reprÚdefining_classs               r$   Úclass_config_sectionÚ!Configurable.class_config_sectionh  sÜ  € ô	4ð !ˆØŸ™Ñ"d°s·}²}Ó"dÓdˆà�—‘�˜a Ð/¨Ð?ˆØ˜WÐ%ˆà×ÑÓ!×%Ñ% mÓ4ˆÞØ×%Ñ%ˆDÞä˜3 	¨2Ó.ˆDÞØ�L‰L™˜4›Ô!Ø�L‰L˜Ôä! #×"2Ñ"2¸$Ð"2Ð"?×"EÑ"EÓ"G×H‰KˆDØ ×3Ñ3Ó5ˆLæØ!$×!4Ñ!4°UÓ!D‘à!$�ØÒ$à—:—:Ø—L‘L¡ 5§:¡:£Ô/ØœT %›[×1Ñ1Ó1à—L‘LÐ!1°E·J±J³LÑ!@ÔAØ—‘Ð-°Ñ<Õ=ð —:—:Ø—L‘L¡ 5§:¡:×#3Ñ#3°D¸!Ó#<¸QÑ#?Ó!@ÔAØ—‘˜}¨^×-DÑ-DÐ,EÀQÀtÀfÐMÔNà�L‰L˜4 §¡˜~¨Q¨t¨f°C¸°~ÐFÔGØ�L‰L˜×ñ/ Ið0 �y‰y˜ÓÐr#   c                ó  • / nU R                   n[        U R                  SS9R                  5       5       GH+  u  p4UR                  R                   nUR
                  (       d  M/  US-   UR
                  -   nSU;   a  USUR                  5       -   -  nOUSU-   -  nUR                  U5         UR                  5       nUbW  [        U5      S:”  a  USS S	-   nUR                  S
S5      nUR                  [        SU-  5      5        UR                  S5        UR                  =(       d    SnUR                  [        [        U5      5      5        UR                  S5        GM.     SR                  U5      $ ! [         a    Sn NÇf = f)zgGenerate rST documentation for this class' config options.

Excludes traits defined on parent classes.
TrY   r•   rž   z : NrŸ   r    r˜   z\nz\\nzDefault: ``%s``r›   zNo descriptionrˆ   )r   rs   rŠ   rh   rD   r1   Úinfo_rstrO   r¤   r¥   rp   r»   r   r‘   r   rr   )	rJ   r¨   Ú	classnamer�   r¦   ÚttypeÚtermliner«   r‘   s	            r$   Úclass_config_rst_docÚ!Configurable.class_config_rst_doc¤  sb  € ð ˆØ—L‘Lˆ	Ü˜s×/Ñ/°tÐ/Ð<×BÑBÓD×E‰HˆAØ—O‘O×,Ñ,ˆEà—:—:ÙØ  3‘¨¯©Ñ3ˆHð ˜‹à˜E E§N¡NÓ$4Ñ4Ñ4‘à˜E E™MÑ)�Ø�L‰L˜Ô"ðØ×.Ñ.Ó0�ð ‰Ü�s“8˜b“=Ø˜c˜r˜( UÑ*�Cà—k‘k %¨Ó1�Ø—‘œVÐ$5¸Ñ$;Ó<Ô=Ø—‘˜RÔ à—:‘:×1Ð!1ˆDØ�L‰Lœ¤ t£Ó-Ô.ð �L‰L˜×ñA FðD �y‰y˜ÓÐøô! ó Ø’ðús   Â-E6Å6FÆF)r/   r.   )r5   re   r9   r:   )r9   z	list[str])rS   r   r9   re   )NN)rS   r   rL   zlist[str] | Nonerf   z)dict[str, TraitType[t.Any, t.Any]] | Noner9   r:   r8   )r/   r   r9   r:   r€   )rŒ   úHasTraits | Noner9   rÂ   )r¦   úTraitType[t.Any, t.Any]rŒ   rÔ   r§   z
str | Noner9   rÂ   )rŒ   rÔ   r9   r:   )r¦   rÕ   r´   zt.Sequence[type[HasTraits]]r9   ztype[Configurable])r´   z"t.Sequence[type[HasTraits]] | Noner9   rÂ   )r9   rÂ   )r   r   r    r!   r
   r   r/   r.   r>   ÚclassmethodrL   rP   r@   r   r   ry   r|   r’   r‹   r¯   r¶   rË   rÒ   r"   Ú__classcell__)rD   s   @r$   r*   r*   5   sZ  ø† Ù�f˜b "Ó%€FÙÐBÈtÑT€F÷B.ðP ó
ó ð
ôð8 +/Ø<@ð	3àð3ð (ð3ð :ð	3ð
 
õ3ñj ˆXÓØóRó ó ðRô "ð  õ%ó ð%ð  ð "&Ø#ð	6 à&ð6 ð ð6 ð ð	6 ð
 
ô6 ó ð6 ðp õ(ó ð(ð ðØ+ðØ6Qðà	óó ðð< õ9 ó ð9 ðv ó) ó ö) r#   r*   c                  óp   • \ rS rSrSr\" SSS9r\" S5      SS j5       r\	" S5      SS j5       r
SS	 jrS
rg)rm   iÑ  zŸA parent class for Configurables that log.

Subclasses have a log trait, and the default behavior
is to get the logger from the currently running Application.
z Logger or LoggerAdapter instanceF)r‘   r,   rn   c                ó:  • [        UR                  [        R                  [        R                  45      (       d>  [
        R                  " U R                  R                   SUR                   S3[        SS9  [        R                  " [        UR                  5      $ )Nz..log should be a Logger or LoggerAdapter, got r•   é   r]   )ri   ÚvalueÚloggingÚLoggerÚLoggerAdapterr   r_   rD   r   r`   ÚtÚcastÚ
LoggerType)rC   Úproposals     r$   Ú_validate_logÚ!LoggingConfigurable._validate_logÚ  sq   € ä˜(Ÿ.™.¬7¯>©>¼7×;PÑ;PÐ*Q×RÑRä�MŠMØ—>‘>×*Ñ*Ð+ð ,Ø Ÿ™Ð' qð*äØò	ô �vŠv”j (§.¡.Ó1Ð1r#   c                óü   • [        U R                  [        5      (       aH  U R                  c   e[        R                  " [
        R                  U R                  R                  5      $ SSKJn  UR                  5       $ )Nr   )rn   )
ri   r.   rm   rß   rà   rÜ   rÝ   rn   Ú	traitletsÚ
get_logger)rC   rn   s     r$   Ú_log_defaultÚ LoggingConfigurable._log_defaultæ  sQ   € ä�d—k‘kÔ#6×7Ñ7Ø—;‘;Ñ*Ð*Ð*Ü—6’6œ'Ÿ.™.¨$¯+©+¯/©/Ó:Ð:Ý!à�~‰~ÓÐr#   c                ó   • U R                   (       d  g[        U R                   [        R                  5      (       a  U R                   OU R                   R                  n[        USS5      (       d  gUR                  S   $ )z›Return the default Handler

Returns None if none can be found

Deprecated, this now returns the first log handler which may or may
not be the default one.
NÚhandlersr   )rn   ri   rÜ   rÝ   Úloggerrj   rë   )rC   rì   s     r$   Ú_get_log_handlerÚ$LoggingConfigurable._get_log_handlerï  s[   € ð �x�xØä" 4§8¡8¬W¯^©^×<Ñ<ˆD�HŠHÀ$Ç(Á(Ç/Á/ð 	ô �v˜z¨4×0Ñ0àØ�‰˜qÑ!Ð!r#   r   N)râ   r   r9   rá   )r9   rá   )r9   zlogging.Handler | None)r   r   r    r!   rÁ   r   rn   r   rã   r   rè   rí   r"   r   r#   r$   rm   rm   Ñ  sI   † ññ Ð5À%Ñ
H€Cáˆeƒ_ó	2ó ð	2ñ ˆUƒ^ó ó ð ÷"r#   rm   ÚCTÚSingletonConfigurable)Úboundc                  ól   • \ rS rSrSrSr\S	S j5       r\S
S j5       r\SS j5       r	\SS j5       r
Srg)rð   i  zäA configurable that only allows one instance.

This class is for classes that should only have one instance of itself
or *any* subclass. To create and retrieve such a class use the
:meth:`SingletonConfigurable.instance` method.
Nc              #  ó¬   #   • U R                  5        H<  n[        X5      (       d  M  [        U[        5      (       d  M,  U[        :w  d  M8  Uv •  M>     g7f)zVWalk the cls.mro() for parent classes that are also singletons

For use in instance()
N)r²   rI   rð   ©rJ   Úsubclasss     r$   Ú	_walk_mroÚSingletonConfigurable._walk_mro  s>   é € ð Ÿ™ž	ˆHä˜3×)Ó)Ü˜xÔ)>×?Ó?ØÔ 5Õ5à”ò "ùs   ‚"A¨A¿AÁ	Ac                ó¦   • U R                  5       (       d  gU R                  5        H'  n[        UR                  U 5      (       d  M   SUl        M)     g)z5unset _instance for this class and singleton parents.N)Úinitializedrö   ri   Ú	_instancerô   s     r$   Úclear_instanceÚ$SingletonConfigurable.clear_instance  sA   € ð �‰× Ñ ØØŸ™žˆHÜ˜(×,Ñ,¨c×2Ó2ð &*�Ö"ò	 (r#   c                ó$  • U R                   c%  U " U0 UD6nU R                  5        H	  nX4l         M     [        U R                   U 5      (       a  U R                   $ [        SU R                   S[        U R                   5      R                   35      e)a  Returns a global instance of this class.

This method create a new instance if none have previously been created
and returns a previously created instance is one already exists.

The arguments and keyword arguments passed to this method are passed
on to the :meth:`__init__` method of the class upon instantiation.

Examples
--------
Create a singleton class using instance, and retrieve it::

    >>> from traitlets.config.configurable import SingletonConfigurable
    >>> class Foo(SingletonConfigurable): pass
    >>> foo = Foo.instance()
    >>> foo == Foo.instance()
    True

Create a subclass that is retrieved using the base class instance::

    >>> class Bar(SingletonConfigurable): pass
    >>> class Bam(Bar): pass
    >>> bam = Bam.instance()
    >>> bam == Bar.instance()
    True
zAn incompatible sibling of 'z(' is already instantiated as singleton: )rú   rö   ri   r'   r   rÄ   )rJ   Úargsr5   rŒ   rõ   s        r$   ÚinstanceÚSingletonConfigurable.instance)  sŠ   € ð: �=‰=Ñ Ù˜Ð' Ñ'ˆDð  ŸM™MžO�Ø%)Ö"ñ ,ô �c—m‘m S×)Ñ)Ø—=‘=Ð ä'Ø.¨s¯|©|¨nð ="Ü"& s§}¡}Ó"5×">Ñ">Ð!?ðAóð r#   c                óD   • [        U S5      =(       a    U R                  SL$ )zHas an instance been created?rú   N)Úhasattrrú   )rJ   s    r$   rù   Ú!SingletonConfigurable.initializedU  s   € ô �s˜KÓ(×F¨S¯]©]À$Ð-FÐFr#   r   )r9   z4t.Generator[type[SingletonConfigurable], None, None])r9   r:   )rJ   ztype[CT]rþ   re   r5   re   r9   rï   )r9   Úbool)r   r   r    r!   rÁ   rú   rÖ   rö   rû   rÿ   rù   r"   r   r#   r$   rð   rð     s_   † ñð €Iàóó ðð ó*ó ð*ð ó)ó ð)ðV óGó óGr#   ).rÁ   Ú
__future__r   rÜ   Útypingrß   Úcopyr   Útextwrapr   Útraitlets.traitletsr   r   r   r	   r
   r   r   r   r   r   Útraitlets.utilsr   Útraitlets.utils.bunchr   Útraitlets.utils.textr   r   Úloaderr   r   r   r   ÚTYPE_CHECKINGÚUnionrÝ   rÞ   rá   r¥   r   r'   r*   rm   ÚTypeVarrï   rð   r   r#   r$   Ú<module>r     sÊ   ðÙ 5õ #ã Û Ý Ý ÷÷ ÷ õ %Ý 'ß 8ç LÓ Lð ‡?‡?Ø—‘˜Ÿ™¨×)>Ñ)>¸q¿u¹uÑ)EÐEÑF�Jà—‘€Jô	˜	ô 	ô	Ð-ô 	ôY �9ô Y ôx."˜,ô ."ðb ‡Y‚YˆtÐ2Ñ3€ôSGÐ/õ SGr#   