
    ZDiJ                     &   S r SSKJrJr  SSKrSSKJr  S rS rS,S jr " S S	\	5      r
\
" S
\40 5      r\\l        S\l         \S4S jr\S4S jr\S4S jr\S4S jr\4S jr\4S jr " S S5      rS rS r " S S5      r " S S5      r\" 5       r " S S\	5      r\" 5       r " S S\S9r " S S \S9r " S! S"\S9r  " S# S$\S9r!\\\ \!4 H!  r"S%RG                  \"R                  S&9\"l         M#     C"S'\$S(\\$\4   S)\4S* jr%S'\$S)\4S+ jr&g)-zDefines experimental extensions to the standard "typing" module that are
supported by the mypy typechecker.

Example usage:
    from mypy_extensions import TypedDict
    )AnyDictN)_type_checkc                      [         R                  " S5      R                  S   S;  a  [        S5      e g! [        [
        4 a     gf = f)N   __name__)abc	functoolstypingz4TypedDict does not support instance and class checksF)sys	_getframe	f_globals	TypeErrorAttributeError
ValueError)clsothers     W/var/www/html/Aiprofessor/professorTrac/lib/python3.13/site-packages/mypy_extensions.py_check_failsr      sW    ==%%j19WWRSS X
  J' s   26 A	A	c                     [        U0 UD6$ N)dict)r   argskwargss      r   	_dict_newr      s           c                    UR                  SS5      nUc  UnOU(       a  [        S5      e[        U5      US.n [        R                  " S5      R
                  R                  SS5      US'   [        US	USS
9$ ! [        [        4 a     Nf = f)NtotalTz@TypedDict takes either a dict or keyword arguments, but not both)__annotations__	__total__r   r   __main__
__module__ )_from_functional_call)
popr   r   r   r   r   getr   r   _TypedDictMeta)r   	_typename_fieldsr   r   nss         r   _typeddict_newr+      s    JJw%E	 ( ) 	) "']	?B==+5599*jQ< )R4HH J' s   3A9 9BBc                   4   ^  \ rS rSrSU 4S jjr\=rrSrU =r	$ )r'   0   c           	        > S[        5       ;   a"  SS KnUR                  S[        U(       a  SOSS9  US:X  a  [        O[
        US'   [        [        U ]#  X[        4U5      nUR                  S0 5      nS	n	UR                  5        V
Vs0 s H  u  pU
[        X5      _M     nn
nU H.  nUR                  UR                  R                  S0 5      5        M0     Xl        [!        US
5      (       d  XGl        U$ s  snn
f )N	TypedDictr   zmypy_extensions.TypedDict is deprecated, and will be removed in a future version. Use typing.TypedDict or typing_extensions.TypedDict instead.      
stacklevel__new__r   z?TypedDict('Name', {f0: t0, f1: t1, ...}); each t must be a typer    )globalswarningswarnDeprecationWarningr+   r   superr'   r4   r   r&   itemsr   update__dict__r   hasattrr    )r   namebasesr*   r   r$   r6   tp_dictannsmsgntpbase	__class__s                r   r4   _TypedDictMeta.__new__1   s     ')#MMS #!6AA   +/+*=994SLvv',O59ZZ\B\EA;r''\BDKK))*;R@A "&w,, % Cs   C6r#   )TF)
r   r"   __qualname____firstlineno__r4   r   __instancecheck____subclasscheck____static_attributes____classcell__)rF   s   @r   r'   r'   0   s    !F -98)r   r'   r/   a  A simple typed name space. At runtime it is equivalent to a plain dict.

    TypedDict creates a dictionary type that expects all of its
    instances to have a certain set of keys, with each key
    associated with a value of a consistent type. This expectation
    is not checked at runtime but is only enforced by typecheckers.
    Usage::

        Point2D = TypedDict('Point2D', {'x': int, 'y': int, 'label': str})
        a: Point2D = {'x': 1, 'y': 2, 'label': 'good'}  # OK
        b: Point2D = {'z': 3, 'label': 'bad'}           # Fails type check
        assert Point2D(x=1, y=2, label='first') == dict(x=1, y=2, label='first')

    The type info could be accessed via Point2D.__annotations__. TypedDict
    supports two additional equivalent forms::

        Point2D = TypedDict('Point2D', x=int, y=int, label=str)

        class Point2D(TypedDict):
            x: int
            y: int
            label: str

    The latter syntax is only supported in Python 3.6+, while two other
    syntax forms work for 3.2+
    c                     U $ )zA normal positional argumentr#   typer>   s     r   ArgrQ   z       Kr   c                     U $ )z*A positional argument with a default valuer#   rO   s     r   
DefaultArgrT      rR   r   c                     U $ )zA keyword-only argumentr#   rO   s     r   NamedArgrV      rR   r   c                     U $ )z,A keyword-only argument with a default valuer#   rO   s     r   DefaultNamedArgrX      rR   r   c                     U $ )z*A *args-style variadic positional argumentr#   rP   s    r   VarArgr[      rR   r   c                     U $ )z*A **kwargs-style variadic keyword argumentr#   rZ   s    r   KwArgr]      rR   r   c                       \ rS rSrSrg)_DEPRECATED_NoReturn   r#   N)r   r"   rH   rI   rL   r#   r   r   r_   r_      s    Dr   r_   c                     U $ r   r#   )r   s    r   traitrb      s    Jr   c                      S $ )Nc                     U $ r   r#   )xs    r   <lambda>mypyc_attr.<locals>.<lambda>   s    Qr   r#   )attrskwattrss     r   
mypyc_attrrj      s    r   c                        \ rS rSrS rS rSrg)_FlexibleAliasClsApplied   c                     Xl         g r   val)selfrp   s     r   __init__!_FlexibleAliasClsApplied.__init__   s    r   c                     U R                   $ r   ro   rq   r   s     r   __getitem__$_FlexibleAliasClsApplied.__getitem__   s    xxr   ro   N)r   r"   rH   rI   rr   rv   rL   r#   r   r   rl   rl      s    r   rl   c                       \ rS rSrS rSrg)_FlexibleAliasCls   c                     [        US   5      $ )N)rl   ru   s     r   rv   _FlexibleAliasCls.__getitem__   s    'R11r   r#   N)r   r"   rH   rI   rv   rL   r#   r   r   ry   ry      s    2r   ry   c                       \ rS rSrS rSrg)_NativeIntMeta   c                 "    [        U[        5      $ r   )
isinstanceint)r   insts     r   rJ    _NativeIntMeta.__instancecheck__   s    $$$r   r#   N)r   r"   rH   rI   rJ   rL   r#   r   r   r   r      s    %r   r   c                   "    \ rS rSrS\4S jrSrg)i64   r   c                 @    U[         La  [        X5      $ [        U5      $ r   	_sentinelr   r   re   rE   s      r   r4   i64.__new__       y q<1vr   r#   Nr   r"   rH   rI   r   r4   rL   r#   r   r   r   r          y r   r   )	metaclassc                   "    \ rS rSrS\4S jrSrg)i32   r   c                 @    U[         La  [        X5      $ [        U5      $ r   r   r   s      r   r4   i32.__new__   r   r   r#   Nr   r#   r   r   r   r      r   r   r   c                   "    \ rS rSrS\4S jrSrg)i16   r   c                 @    U[         La  [        X5      $ [        U5      $ r   r   r   s      r   r4   i16.__new__   r   r   r#   Nr   r#   r   r   r   r      r   r   r   c                   "    \ rS rSrS\4S jrSrg)u8   r   c                 @    U[         La  [        X5      $ [        U5      $ r   r   r   s      r   r4   
u8.__new__   r   r   r#   Nr   r#   r   r   r   r      r   r   r   a/  A native fixed-width integer type when used with mypyc.

        In code not compiled with mypyc, behaves like the 'int' type in these
        runtime contexts:

        * {name}(x[, base=n]) converts a number or string to 'int'
        * isinstance(x, {name}) is the same as isinstance(x, int)
        r>   r>   module_globalsreturnc                     UR                  SU  35      =nc  S[         SU  S3n[        U5      eX!U '   U S;   a  SU  SU  SU  S	3nO S
U  S35       eSS KnUR	                  U[
        SS9  U$ )N_DEPRECATED_zmodule 'z' has no attribute ''>   NoReturnz'mypy_extensions.zF' is deprecated, and will be removed in a future version. Use 'typing.z' or 'typing_extensions.z	' insteadz-Add deprecation message for 'mypy_extensions.r   r0   r2   )r&   r   r   r6   r7   r8   )r>   r   rp   rB   r6   s        r   _warn_deprecationr      s    !!L"788A
"6tfA>S!!4|v && 8iI 	 	NEdV1MMuMM#)aM8Jr   c                 &    [        U [        5       S9$ )N)r   )r   r5   r   s    r   __getattr__r      s    T')<<r   r   )'__doc__r   r   r   r   r   r   r   r+   rP   r'   r   r/   r   r"   rQ   rT   rV   rX   r[   r]   r_   rb   rj   rl   ry   FlexibleAliasr   objectr   r   r   r   r   	_int_typeformatstrr   r   r#   r   r   <module>r      s    
 !I$$9T $9N ;4		  
 B t 
 d 
 D 
 4 
  
   !   2 2
 "#%T %
 H	N N N >  c3"I	 F	**F+  # C c3h C $=c =c =r   