
    *e                    8    d Z ddlmZ ddlmZmZmZ ddddZdS )zf
This is a module for various lookup functions:
functions that will find a semantic node by its name.
    )annotations)MypyFileSymbolTableNodeTypeInfoF)raise_on_missingnamestrmodulesdict[str, MypyFile]r   boolreturnSymbolTableNode | Nonec                  | }g }	 d|vr|rd|v sJ d|              dS |                     dd          \  }}|                    |           |                    |          }|na|j        }|s|r|sJ d|  d            dS 	 |                                }||vr|r||v sJ d	|d
|             dS ||         }	|s|	S |	j        }
t          |
t                    s|r|
sJ d|              dS |
j        }s)aW  Find a symbol using it fully qualified name.

    The algorithm has two steps: first we try splitting the name on '.' to find
    the module, then iteratively look for each next chunk after a '.' (e.g. for
    nested classes).

    This function should *not* be used to find a module. Those should be looked
    in the modules dictionary.
    T.zCannot find module for N   )maxsplitzCannot find z, got a module symbolzCannot find component z for )rsplitappendgetnamespopnode
isinstancer   )r   r
   r   headresttailmodr   keystnoder   s              +lib/python3.11/site-packages/mypy/lookup.pylookup_fully_qualifiedr!      s    DD	d?? Ed{{{$Dd$D$D{{{4[[q[11
dDkk$?	 IE  	DCCCCCCCCCthhjje Se|||%Rc%R%R$%R%R|||4s 	M{ $)) 	 3222D222224
!    N)r   r	   r
   r   r   r   r   r   )__doc__
__future__r   
mypy.nodesr   r   r   r!    r"   r    <module>r'      sp    
 # " " " " " : : : : : : : : : : JO0 0 0 0 0 0 0 0r"   