
    X-Ph                    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               v   |                      d          }|dk    r| n	| d|         }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 |dk    r|dxx         | |d         z  cc<   	 |                                }	|	|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.
    z
<subclass NT.zCannot find module for    )maxsplitzCannot find z, got a module symbolr   zCannot find component z for )	findrsplitappendgetnamespopnode
isinstancer   )r   r
   r   iheadresttailmodr   keystnoder   s               K/var/www/html/test/jupyter/venv/lib/python3.11/site-packages/mypy/lookup.pylookup_fully_qualifiedr$      s    			,A7744RaR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BwwQ48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4 4 4 4 4 4 4 4r%   