
    eD                        d dl mZ d dlZd dlmZ d dlmZ  G d de      Z G d de      Zdd	Z	ddd
Z
ddZddZddZddZddZy)    )annotationsN)
NamedTuple)Contextc                  "    e Zd ZU ded<   ded<   y)FunctionTypezlist[ast.expr]argtypeszast.exprreturnsN)__name__
__module____qualname____annotations__     ./usr/lib/python3/dist-packages/astroid/_ast.pyr   r      s    r   r   c                  J    e Zd ZU ded<   ded<   ded<   ded<   d	ed
<   dddZy)ParserModuledict[type[ast.unaryop], str]unary_op_classesdict[type[ast.cmpop], str]cmp_op_classesdict[type[ast.boolop], str]bool_op_classesdict[type[ast.operator], str]bin_op_classes%dict[type[ast.expr_context], Context]context_classesc                0    t        j                  ||      S )N)type_comments)astparse)selfstringr   s      r   r    zParserModule.parse   s    yy}==r   NT)r"   strr   boolreturnz
ast.Module)r
   r   r   r   r    r   r   r   r   r      s%    22..0011::>r   r   c                r    t        j                  | dd      }t        |j                  |j                        S )z;Given a correct type comment, obtain a FunctionType object.z<type_comment>	func_type)r   r	   )r   r    r   r   r	   )type_commentr(   s     r   parse_function_type_commentr*      s.    		,(8+FI!3!3Y=N=NOOr   c                    t               }t               }t               }t               }t	               }t        |||||      S N)_unary_operators_from_module_compare_operators_from_module_bool_operators_from_module_binary_operators_from_module_contexts_from_moduler   )r   r   r   r   r   r   s         r   get_parser_moduler2   #   sG    3535N13O24N+-O r   c                     t         j                  dt         j                  dt         j                  dt         j                  diS )N+-not~)r   UAddUSubNotInvertr   r   r   r-   r-   3   s)    HHc388S#''5#**cJJr   c                    t         j                  dt         j                  dt         j                  dt         j                  dt         j
                  dt         j                  dt         j                  dt         j                  dt         j                  d	t         j                  d
t         j                  dt         j                  dt         j                  diS )Nr4   &|^/z//@%*z**r5   z<<z>>)r   AddBitAndBitOrBitXorDivFloorDivMatMultModMultPowSubLShiftRShiftr   r   r   r0   r0   7   s    

C		3

CdS#

D

D r   c                 F    t         j                  dt         j                  diS )Nandor)r   AndOrr   r   r   r/   r/   I   s    GGUCFFD))r   c                 F   t         j                  dt         j                  dt         j                  dt         j                  dt         j
                  dt         j                  dt         j                  dt         j                  dt         j                  d	t         j                  d
i
S )Nz==>z>=iniszis not<z<=z!=znot in)r   EqGtGtEInIsIsNotLtLtENotEqNotInr   r   r   r.   r.   M   sf    		8		4		8 r   c                     t         j                  t        j                  t         j                  t        j                  t         j                  t        j                  t         j
                  t        j                  iS r,   )r   Loadr   StoreDelParamr   r   r   r1   r1   \   s@    ',,		7==		7==	 r   )r)   r$   r&   zFunctionType | Noner#   )r   r%   r&   r   )r&   r   )r&   r   )r&   r   )r&   r   )r&   r   )
__future__r   r   typingr   astroid.constr   r   r   r*   r2   r-   r0   r/   r.   r1   r   r   r   <module>rm      sP   
 # 
  !: 
>: >P K$*r   