ó
    Ñ]j  ã                   ót   • S r SSKrSSKrSSKJr  S/4S jr\" 5       u  rrS rSS jr	S r
  SS	 jrSS
 jrg)u‘   Support for wildcard pattern matching in object inspection.

Authors
-------
- JÃ¶rgen Stenarson <jorgen.stenarson@bostream.nu>
- Thomas Kluyver
é    N)Údir2Úlambdac                 óú   • [        [        5       Vs/ s H  oR                  S5      (       d  M  UPM     nn0 0 pCU H5  nUSS R                  5       n[	        [        U5      nXcU'   XP;  d  M1  XTU'   M7     X44$ s  snf )zvReturn dictionaries mapping lower case typename (e.g. 'tuple') to type
objects from the types package, and vice versa.ÚTypeNéüÿÿÿ)ÚdirÚtypesÚendswithÚlowerÚgetattr)Údont_include_in_type2typestrÚtnameÚtypenamelistÚtypestr2typeÚtype2typestrÚnameÚobjs          ÚS/home/mande/repo/quber/.venv/lib/python3.13/site-packages/IPython/utils/wildcard.pyÚcreate_typestr2type_dictsr      s}   € ô (+¬5¤zÓL¢z˜e·^±^ÀF×5K—E¡z€LÐLØ!# R�,ãˆØ�S�bˆz×ÑÓ!ˆÜ”e˜UÓ#ˆØ �TÑØÕ3Ø $˜Óñ ð Ð%Ð%ùò Ms
   ’A8¯A8c                 óŽ   • US:X  a  g[        U5      [         :X  a  UnO[        R                  US5      nU(       a  [        X5      $ g)zõis_type(obj, typestr_or_type) verifies if obj is of a certain type. It
can take strings or actual python types for the second argument, i.e.
'tuple'<->TupleType. 'all' matches all types.

TODO: Should be extended for choosing more than one type.ÚallTF)Útyper   ÚgetÚ
isinstance)r   Útypestr_or_typeÚ	test_types      r   Úis_typer   &   sD   € ð ˜%ÓØÜˆOÓ¤Ó$Ø#‰	ä ×$Ñ$ _°eÓ<ˆ	ÞÜ˜#Ó)Ð)Øó    c                 óp   • U=(       d.    U R                  S5      =(       d    U R                  S5      (       + $ )zCReturn true for strings starting with single _ if show_all is true.Ú__Ú_)Ú
startswith)ÚstrÚshow_alls     r   Úshow_hiddenr%   6   s'   € à×F�s—~‘~ dÓ+×F°3·>±>À#Ó3FÔ/FÐFr   c                 ól   • 0 n[        U 5       H  n [        X5      X'   M     U$ ! [         a     M$  f = f)zsProduce a dictionary of an object's attributes. Builds on dir2 by
checking that a getattr() call actually succeeds.)r   r   ÚAttributeError)r   ÚnsÚkeys      r   Údict_dirr*   :   sC   € ð 
€BÜ�CŽyˆðÜ˜SÓ&ˆ2‹7ñ ð €Iøô ó Úðús   ’%¥
3²3c                 ó(  ^^^• UR                  SS5      R                  SS5      nU(       a)  [        R                  " US-   [        R                  5      mO[        R                  " US-   5      m[	        UUU4S jU R                  5        5       5      $ )z<Filter a namespace dictionary by name pattern and item type.Ú*z.*Ú?Ú.Ú$c              3   óª   >#   • U  HH  u  pTR                  U5      (       d  M  [        UT5      (       d  M0  [        UT5      (       d  MC  X4v •  MJ     g 7f)N)Úmatchr%   r   )Ú.0r)   r   Úregr$   Útype_patterns      €€€r   Ú	<genexpr>Úfilter_ns.<locals>.<genexpr>U   sB   øé € ð Mª*™h˜c¸¿	¹	À#¿“	Ü0;¸CÀ×0Jó ä07¸¸\×0Jó �•	ª*ùs   ƒA£A¶AÁ	
A)ÚreplaceÚreÚcompileÚIÚdictÚitems)r(   Úname_patternr4   Úignore_caser$   Úpatternr3   s     ` ` @r   Ú	filter_nsr@   K   sv   ú€ ð ×"Ñ" 3 tÓ,×4Ñ4°S¸Ó=€GÞÜ�jŠj˜ ™¤b§d¡dÓ+‰ä�jŠj˜ ™Ó%ˆô ö M¨"¯(©(¬*ó Mó Mð Mr   c           
      óJ  • UR                  S5      n[        U5      S:X  a  [        XS   UX4S9$ [        XS   SX4S9n0 nUR                  5        HP  u  p‰[	        [        U	5      USR                  USS 5      X4S9n
U
R                  5        H  u  p¼XÇU< SU< 3'   M     MR     U$ )z^Return dictionary of all objects in a namespace dictionary that match
type_pattern and filter.r.   é   r   )r=   r4   r>   r$   r   N)r>   r$   )ÚsplitÚlenr@   r<   Úlist_namespacer*   Újoin)Ú	namespacer4   Úfilterr>   r$   Úpattern_listÚfilteredÚresultsr   r   r(   Ú
inner_nameÚ	inner_objs                r   rE   rE   Y   s¿   € ð —‘˜cÓ"€LÜ
ˆ<Ó˜AÓÜ˜	¸Q±Ø%1Ø$/ñDð Dô ˜YÀ!±_Ø).Ø(3ñHˆð ˆØ!Ÿ™Ö)‰IˆDÜ¤¨£¨|Ø #§¡¨°a°bÐ)9Ó :Ø,7ñLˆBð *,¯©®Ñ%�
Ø5>£¢jÐ1Ó2ó *4ñ	 *ð ˆr   )F)r,   r   TT)FF)Ú__doc__r8   r	   ÚIPython.utils.dir2r   r   r   r   r   r%   r*   r@   rE   © r   r   Ú<module>rQ      sS   ðñó 
Û å #à<D¸:ô &ñ 7Ó8Ñ €ˆlòô Gòð" EIØôMõr   