+
    i|                        ^ RI Ht ^ RIHtHt ^ RIHt ^ RIHtH	t	 ^ RI
Ht ^ RIHt R R ltR	tR
 R ltRR R lltR R ltR# )    )annotations)contextnodes)register_module_extender)_extract_single_nodeparse)inference_tip)AstroidManagerc                   V ^8  d   QhRR/# )   returnznodes.Module )formats   ";/usr/lib/python3/dist-packages/astroid/brain/brain_regex.py__annotate__r      s     	 	, 	    c                     \        R4      # )zThe RegexFlag enum exposes all its entries by updating globals().

We hard-code the flags for now.
# pylint: disable-next=line-too-long
See https://github.com/mrabarnett/mrab-regex/blob/2022.10.31/regex_3/regex.py#L200
aA  
    A = ASCII = 0x80          # Assume ASCII locale.
    B = BESTMATCH = 0x1000    # Best fuzzy match.
    D = DEBUG = 0x200         # Print parsed pattern.
    E = ENHANCEMATCH = 0x8000 # Attempt to improve the fit after finding the first
                              # fuzzy match.
    F = FULLCASE = 0x4000     # Unicode full case-folding.
    I = IGNORECASE = 0x2      # Ignore case.
    L = LOCALE = 0x4          # Assume current 8-bit locale.
    M = MULTILINE = 0x8       # Make anchors look for newline.
    P = POSIX = 0x10000       # POSIX-style matching (leftmost longest).
    R = REVERSE = 0x400       # Search backwards.
    S = DOTALL = 0x10         # Make dot match newline.
    U = UNICODE = 0x20        # Assume Unicode locale.
    V0 = VERSION0 = 0x2000    # Old legacy behaviour.
    DEFAULT_VERSION = V0
    V1 = VERSION1 = 0x100     # New enhanced behaviour.
    W = WORD = 0x800          # Default Unicode word breaks.
    X = VERBOSE = 0x40        # Ignore whitespace and comments.
    T = TEMPLATE = 0x1        # Template (present because re module has it).
    )r   r   r   r   _regex_transformr      s       	 	r   z?
@classmethod
def __class_getitem__(cls, item):
    return cls
c                    V ^8  d   QhRRRR/# )r   node
nodes.Callr   boolr   )r   s   "r   r   r   3   s      z d r   c                b   V P                  4       P                  R8H  ;'       Ed    \        V P                  \        P
                  4      ;'       d    V P                  P                  R8H  ;'       d    \        V P                  \        P                  4      ;'       d    \        V P                  P                  4      ^8H  ;'       dh    \        V P                  P                  ^ ,          \        P                  4      ;'       d+    V P                  P                  ^ ,          P                  R9   # )zCheck for regex.Pattern or regex.Match call in stdlib.

Match these patterns from stdlib/re.py
```py
Pattern = type(...)
Match = type(...)
```
zregex.regextype>   MatchPattern)rootname
isinstancefuncr   NameparentAssignlentargets
AssignName)r   s   &r   _looks_like_pattern_or_matchr'   3   s     			M) 	@ 	@tyy%**-	@ 	@IINNf$	@ 	@ t{{ELL1	@ 	@ ##$)		@ 	@
 t{{**1-u/?/?@	@ 	@ KK"''+??r   Nc                    V ^8  d   QhRRRR/# )r   r   r   ctxzcontext.InferenceContext | Noner   )r   s   "r   r   r   G   s      j /N r   c           	     >   \         P                  ! V P                  P                  ^ ,          P                  V P
                  V P                  V P                  V P                  V P                  R7      p\        \        4      pV.VP                  R&   \        V.4      # )zTInfer regex.Pattern and regex.Match as classes.

For PY39+ add `__class_getitem__`.
)r   lineno
col_offsetr"   
end_linenoend_col_offset__class_getitem__)r   ClassDefr"   r%   r   r+   r,   r-   r.   r   CLASS_GETITEM_TEMPLATElocalsiter)r   r)   	class_deffunc_to_adds   &&  r   infer_pattern_matchr6   G   s|    
 [[  #(({{??{{??**I ''=>K-8MI()r   c                    V ^8  d   QhRRRR/# )r   managerr
   r   Noner   )r   s   "r   r   r   Y   s      n  r   c                    \        V R \        4       V P                  \        P                  \        \        4      \        4       R# )regexN)r   r   register_transformr   Callr	   r6   r'   )r8   s   &r   registerr>   Y   s/    Wg/?@

M"568Tr   )N)
__future__r   astroidr   r   astroid.brain.helpersr   astroid.builderr   r   astroid.inference_tipr	   astroid.managerr
   r   r1   r'   r6   r>   r   r   r   <module>rE      s5   
 # " : 7 / *	< ($r   