+
    &jJ                    Z    ^ RI Ht ^ RIt^ RIHt ]]],          ,          t ! R R4      tR# )    )annotationsN)Iterablec                  ~    ] tR t^tRtRRRR/R R lltR tR tR	 R
 lt]	RR R ll4       t
]	RR R ll4       tRtR# )	GlobGroupa1  A set of patterns that candidate strings will be matched against.

A candidate is composed of a list of segments separated by ``separator``, e.g. "foo.bar.baz".

A pattern contains one or more segments. Segments can be:
    - A literal string (e.g. "foo"), which matches exactly.
    - A string containing a wildcard (e.g. "torch*", or "foo*baz*"). The wildcard matches
      any string, including the empty string.
    - A double wildcard ("**"). This matches against zero or more complete segments.

Examples:
    ``torch.**``: matches ``torch`` and all its submodules, e.g. ``torch.nn`` and ``torch.nn.functional``.
    ``torch.*``: matches ``torch.nn`` or ``torch.functional``, but not ``torch.nn.functional``.
    ``torch*.**``: matches ``torch``, ``torchvision``, and all their submodules.

A candidates will match the ``GlobGroup`` if it matches any of the ``include`` patterns and
none of the ``exclude`` patterns.

Args:
    include (str | Iterable[str]): A string or list of strings,
        each representing a pattern to be matched against. A candidate
        will match if it matches *any* include pattern
    exclude (str | Iterable[str]): A string or list of strings,
        each representing a pattern to be matched against. A candidate
        will be excluded from matching if it matches *any* exclude pattern.
    separator (str): A string that delimits segments in candidates and
        patterns. By default this is "." which corresponds to how modules are
        named in Python. Another common value for this is "/", which is
        the Unix path separator.
exclude	separator.c               $    V ^8  d   QhRRRRRR/# )   includeGlobPatternr   r   str )formats   "p/Users/jameslopez/projects/CWCArchive/cwc-podcast/.venv/lib/python3.14/site-packages/torch/package/glob_group.py__annotate__GlobGroup.__annotate__+   s$     # #"#0;#MP#    c               	    R V RV R2V n         \        P                  W4      V n        \        P                  W#4      V n        W0n        R# )zGlobGroup(include=z
, exclude=)N)_dbgr   
_glob_listr   r   r   )selfr   r   r   s   &&$$r   __init__GlobGroup.__init__+   sC     )	G9AF	 ++G? ++G?"r   c                	    V P                   # Nr   r   s   &r   __str__GlobGroup.__str__3       yyr   c                	    V P                   # r   r   r   s   &r   __repr__GlobGroup.__repr__6   r"   r   c                    V ^8  d   QhRRRR/# )r   	candidater   returnboolr   )r   s   "r   r   r   9   s     
 
 
 
r   c                	r  a V P                   S,           o\        ;QJ d)    V3R  lV P                   4       F  '       g   K   RM	  RM! V3R  lV P                   4       4      ;'       dO    \        ;QJ d)    V3R lV P                   4       F  '       d   K   R# 	  R# ! V3R lV P                   4       4      # )c              3  D   <"   T F  qP                  S4      x  K  	  R # 5ir   	fullmatch.0pr'   s   & r   	<genexpr>$GlobGroup.matches.<locals>.<genexpr>;   s     @<a;;y))<s    TFc              3  N   <"   T F  qP                  S4      '       * x  K  	  R # 5ir   r,   r.   s   & r   r1   r2   ;   s"      I
0<1I&&&s   "%)r   anyr   allr   )r   r'   s   &fr   matchesGlobGroup.matches9   s    NNY.	s@4<<@sss@4<<@@ 
 
SS I
04I
SS 	
S 	
S I
04I
 F
 	
r   c                    V ^8  d   QhRRRR/# )r   elemsr   r   r   r   )r   s   "r   r   r   @   s     H H+ H# Hr   c                	    \        V \        4      '       d   \        P                  W4      .# V  Uu. uF  p\        P                  W!4      NK  	  up# u upi r   )
isinstancer   r   _glob_to_re)r9   r   es   && r   r   GlobGroup._glob_list?   sF    eS!!))%;<<AFGAI))!7GGGs   Ac                    V ^8  d   QhRRRR/# )r   patternr   r   r   )r   s   "r   r   r   G   s     " "S "S "r   c                	   aa V3R  loRP                  V3R lV P                  S4       4       4      p\        P                  ! V4      # )c                :  < R V 9   dE   V R 8X  d3   R\         P                  ! S4      ,           R,           S,           R,           # \        R4      h\         P                  ! S4      RS,           R,           P                  R V P	                  R4       4       4      ,           # )z**(z[^z]+)*z,** can only appear as an entire path segmentz]*c              3  N   "   T F  p\         P                  ! V4      x  K  	  R # 5ir   )reescape)r/   xs   & r   r1   AGlobGroup._glob_to_re.<locals>.component_to_re.<locals>.<genexpr>Q   s      M*>QBIIaLL*>s   #%*)rE   rF   
ValueErrorjoinsplit)	componentr   s   &r   component_to_re.GlobGroup._glob_to_re.<locals>.component_to_reJ   s    y $9!55<yH6QQ$%STTyy+ti/?$/F.L.L M*3//#*>M /  r    c              3  4   <"   T F  pS! V4      x  K  	  R # 5ir   r   )r/   crN   s   & r   r1   (GlobGroup._glob_to_re.<locals>.<genexpr>U   s     N5M++5Ms   )rK   rL   rE   compile)r@   r   resultrN   s   &f @r   r<   GlobGroup._glob_to_reF   s6    		 NW]]95MNNzz&!!r   )r   r   r   r   Nr   )r	   )__name__
__module____qualname____firstlineno____doc__r   r    r$   r6   staticmethodr   r<   __static_attributes__r   r   r   r   r      sU    >#>@#SV#
 H H " "r   r   )
__future__r   rE   collections.abcr   r   r   r   r   r   r   <module>r`      s*    " 	 $ HSM!K" K"r   