o
    7fLv                     @  sx  U d Z ddlmZ ddlZddlZddlZddlZddlZddlZddl	Z	ddl
Z
ddlmZ ddlmZmZmZmZmZmZmZmZ ddlmZ zddlZddlZdZW n ey`   dZY nw ed	Ze	jd
krxee dd Z!de"d< ne#ddZ$ee$j%d Z!W d   n1 sw   Y  e&dZ'de"d< dZ(de"d< dZ)de"d< dZ*de"d< dZ+de"d< dZ,de"d< e-dZ.de"d< ddd#d$Z/dd%d&Z0dd)d*Z1dd/d0Z2dd2d3Z3dd6d7Z4dd;d<Z5dd>d?Z6G d@dA dAe7Z8ddCdDZ9ddIdJZ:ddPdQZ;ddSdTZ<dUZ=de"dV< dWZ>de"dX< dYZ?de"dZ< d[Z@de"d\< d]ZAde"d^< ddfdgZBddidjZCG dkdl dlZDddndoZEddtduZFi ZGdve"dw< dd{d|ZH	}ddddZIdddZJddddZKdddZLdddZMdddZNdddZOdddZPdddZQddddZRdddZSdddZTdddZUG dd dZVdddZWdddZXdddZYe
jZZ[dddZ\dddZ]dddZ^dS )z3Utility functions with no non-trivial dependencies.    )annotationsN)	resources)IOCallable	ContainerFinalIterableSequenceSizedTypeVar)LiteralTFT)   	   mypytypeshedr   TYPESHED_DIRzpy.typeds=   ([ \t\v]*#.*(\r\n?|\n))??[ \t\v]*#.*coding[:=][ \t]*([-\w.]+)ENCODING_RE   DEFAULT_SOURCE_OFFSETP   DEFAULT_COLUMNS   MINIMUM_WIDTH
   MINIMUM_WINDOWS_MAJOR_VT100iZ)  MINIMUM_WINDOWS_BUILD_VT100)__init____new____call____init_subclass____class_getitem__SPECIAL_DUNDERSnamestrexclude_specialboolreturnc                 C  s$   |r| t v rdS | do| dS )zReturns whether name is a dunder name.

    Args:
        exclude_special: Whether to return False for a couple special dunder methods.

    F__)r"   
startswithendswith)r#   r%    r+   B/home/ertert/spirit/venv/lib/python3.10/site-packages/mypy/util.py	is_dunder;   s   r-   c                 C  s   t |  o| do| dS N_)r-   r)   r*   r#   r+   r+   r,   	is_sunderG   s   r1   mod_name	list[str]c                 C  s4   | g}d| v r|  ddd } ||  d| v s|S )zReturn the module and all parent module names.

    So, if `mod_name` is 'a.b.c', this function will return
    ['a.b.c', 'a.b', and 'a'].
    .   r   )rsplitappend)r2   outr+   r+   r,   split_module_namesK   s   
r9   modulesIterable[str]target
str | Nonec                 C  s   t | |}|d u rd S |d S Nr   )split_target)r:   r<   resultr+   r+   r,   module_prefixX   s   
rA   tuple[str, str] | Nonec                 C  sR   g }	 || v r|d |fS |dd}t|dkrd S |d }|d|d  q)NTr4   r5   r   )joinr6   leninsert)r:   r<   	remaining
componentsr+   r+   r,   r?   _   s   r?   objobjectc                 C  s,   | du rdS t t| }|dd dS )zReturn the last component of the type name of an object.

    If obj is None, return 'nil'. For example, if obj is 1, return 'int'.
    Nnilr4   z'>)r$   typesplitrstrip)rH   tr+   r+   r,   
short_typek   s   rP   textbytestuple[str, int]c                 C  sZ   t | }|r'|drdnd}|dd}|ds!|dkr#d}||fS d}|d	fS )
z*PEP-263 for detecting Python file encodingr5      r   ascii)ziso-latin-1-zlatin-1-ziso-latin-1zlatin-1utf8rK   )r   matchgroupdecoder)   )rQ   r@   lineencodingdefault_encodingr+   r+   r,   find_python_encodingv   s   
r]   bc                 C  s   t | dd S )a2  Converts bytes into some human-readable representation. Unprintable
    bytes such as the nul byte are escaped. For example:

        >>> b = bytes([102, 111, 111, 10, 0])
        >>> s = bytes_to_human_readable_repr(b)
        >>> print(s)
        foo
 
        >>> print(repr(s))
        'foo\n\x00'
    rT   rK   )repr)r^   r+   r+   r,   bytes_to_human_readable_repr   s   r`   c                   @  s   e Zd ZdZdS )DecodeErrorzException raised when a file cannot be decoded due to an unknown encoding type.

    Essentially a wrapper for the LookupError raised by `bytearray.decode`
    N)__name__
__module____qualname____doc__r+   r+   r+   r,   ra      s    ra   sourcec              
   C  s`   |  drd}| dd } nt| \}}z| |}W |S  ty/ } ztt||d}~ww )zmRead the Python file with while obeying PEP-263 encoding detection.

    Returns the source as a string.
    s   ﻿rV   r   N)r)   r]   rY   LookupErrorra   r$   )rf   r[   r/   source_text	lookuperrr+   r+   r,   decode_python_encoding   s   
rj   pathreadCallable[[str], bytes]list[str] | Nonec                 C  sJ   z|| }W n
 t y   Y dS w z	t| }W |S  ty$   Y dS w )zaTry reading a Python file as list of source lines.

    Return None if something goes wrong.
    N)OSErrorrj   
splitlinesra   )rk   rl   rf   source_linesr+   r+   r,   read_py_file   s   rr   rZ   max_lenintcol	min_widthc                 C  s   |d| d k rd| d }t | |kr| dfS || |k r(| d| d dfS |t | | d k rL|| | d }d| ||| d   d |d fS d| | d  t | | d fS )a  Trim a line of source code to fit into max_len.

    Show 'min_width' characters on each side of 'col' (an error location). If either
    start or end is trimmed, this is indicated by adding '...' there.
    A typical result looks like this:
        ...some_variable = function_to_call(one_arg, other_arg) or...

    Return the trimmed string and the column offset to to adjust error location.
    rT   r5   r   N...r   rD   )rZ   rs   ru   rv   offsetr+   r+   r,   trim_source_line   s   
$"rz   list[tuple[int, str]]c                 C  s\   d}|| vrg S |  d}g }t|D ]\}}||r+||d |t|d  f q|S )Nz# mypy: 
r5   )rM   	enumerater)   r7   rD   )rf   PREFIXlinesresultsirZ   r+   r+   r,   get_mypy_comments   s   

r   z<?xml version="1.0" encoding="utf-8"?>
<testsuite errors="{errors}" failures="{failures}" name="mypy" skips="0" tests="{tests}" time="{time:.3f}">
JUNIT_HEADER_TEMPLATEz  <testcase classname="mypy" file="{filename}" line="1" name="{name}" time="{time:.3f}">
    <failure message="mypy produced messages">{text}</failure>
  </testcase>
JUNIT_TESTCASE_FAIL_TEMPLATEz  <testcase classname="mypy" file="mypy" line="1" name="mypy-py{ver}-{platform}" time="{time:.3f}">
    <error message="mypy produced errors">{text}</error>
  </testcase>
JUNIT_ERROR_TEMPLATEzr  <testcase classname="mypy" file="mypy" line="1" name="mypy-py{ver}-{platform}" time="{time:.3f}">
  </testcase>
JUNIT_TESTCASE_PASS_TEMPLATEz</testsuite>
JUNIT_FOOTERdtfloatseriousmessages_by_filedict[str | None, list[str]]versionplatformc                 C  s   ddl m} |rd}t|}nt|}d}tj||| t|pdd}|s/|tj| ||d7 }n9| D ]4\}	}
|	d urR|tj|d|
|	| dj|||	dd	7 }q3|tj|d|
d
| dj||dd	7 }q3|t	7 }|S )Nr   )escaper5   )errorsfailurestimetests)r   verr   r|   z"mypy-py{ver}-{platform} {filename})r   r   filename)rQ   r   r   r#   r   zmypy-py{ver}-{platform})r   r   )
xml.sax.saxutilsr   rD   r   formatr   itemsr   rC   r   )r   r   r   r   r   r   r   r   xmlr   messagesr+   r+   r,   _generate_junit_contents  s@   


	
r   Nonec           	      C  sr   t | ||||}tjtj|}tj|dd t|d}||d W d    d S 1 s2w   Y  d S )NT)exist_okwbutf-8)	r   osrk   dirnameabspathmakedirsopenwriteencode)	r   r   r   rk   r   r   r   xml_dirsfr+   r+   r,   write_junit_xml5  s   "r   c                   @  s$   e Zd ZdZdddZdd	d
ZdS )IdMapperzGenerate integer ids for objects.

    Unlike id(), these start from 0 and increment by 1, and ids won't
    get reused across the life-time of IdMapper.

    Assume objects don't redefine __eq__ or __hash__.
    r'   r   c                 C  s   i | _ d| _d S r>   id_mapnext_idselfr+   r+   r,   r   P  s   
zIdMapper.__init__orI   rt   c                 C  s.   || j vr| j| j |< |  jd7  _| j | S )Nr5   r   )r   r   r+   r+   r,   idT  s   

zIdMapper.idN)r'   r   )r   rI   r'   rt   )rb   rc   rd   re   r   r   r+   r+   r+   r,   r   G  s    
r   fullnamec                 C  s   |  ddd S )zBDrop the final component of a qualified name (e.g. ('x.y' -> 'x').r4   r5   r   )r6   )r   r+   r+   r,   
get_prefix[  s   r   
cur_mod_idrelativeis_cur_package_init_filetuple[str, bool]c                 C  sp   |dkr|dfS |  d}|}|r|d8 }t||k}|dkr)d|d |  } | |r3d|  |fS d |fS )Nr   Tr4   r5    )rM   rD   rC   )r   r   r<   r   partsrelokr+   r+   r,   correct_relative_import`  s   
r   z$Final[dict[type[object], list[str]]]fields_cacheclstype[object]Sequence[str]c                   s>   dd l  | tvr |  fdd}dd |D t| < t|  S )Nr   c                   s     | p	 | S N)isgetsetdescriptorismemberdescriptor)r   inspectr+   r,   <lambda>y  s    z'get_class_descriptors.<locals>.<lambda>c                 S  s$   g | ]\}}|d kr|dkr|qS )__weakref____dict__r+   ).0xyr+   r+   r,   
<listcomp>{  s   $ z)get_class_descriptors.<locals>.<listcomp>)r   r   
getmembers)r   membersr+   r   r,   get_class_descriptorsr  s   r   r+   newold	copy_dict
skip_slotstuple[str, ...]c              	   C  s   t |dr|rt|j| _n|j| _t|jD ]+}||v rqzt ||r.t| |t|| n
t | |r8t| | W q tyB   Y qw dS )a   Copy state of old node to the new node.

    This handles cases where there is __dict__ and/or attribute descriptors
    (either from slots or because the type is defined in a C extension module).

    Assume that both objects have the same __class__.
    r   N)	hasattrdictr   r   	__class__setattrgetattrdelattrAttributeError)r   r   r   r   attrr+   r+   r,   replace_object_state  s"   




r   path1path2c                 C  s   t |t | jv S )z8Given two paths, return if path1 is a sub-path of path2.)pathlibPathparents)r   r   r+   r+   r,   is_sub_path  s   r   statusc                 C  s"   t j  t j  t|  dS )zKill the current process without fully cleaning up.

    This can be quite a bit faster than a normal exit() since objects are not freed.
    N)sysstdoutflushstderrr   _exit)r   r+   r+   r,   	hard_exit  s   

r   c                 C  s
   |  dS )z+Remove internal suffixes from a short name.')rN   r0   r+   r+   r,   unmangle  s   
r   existingContainer[str]c                 C  sL   | d }||vr
|S d}|t | |v r |d7 }|t | |v s|t | S )zGet a simple redefinition name not present among existing.

    For example, for name 'foo' we try 'foo-redefinition', 'foo-redefinition2',
    'foo-redefinition3', etc. until we find one that is not in existing.
    z-redefinitionrT   r5   )r$   )r#   r   r_namer   r+   r+   r,   get_unique_redefinition_name  s   r   programc                 C  s,   t jdd dk rt dj| d dS dS )zAReport issues with the Python used to run mypy, dmypy, or stubgenNrT   )r      zXRunning {name} with Python 3.7 or lower is not supported; please upgrade to 3.8 or newerr0   )r   version_infoexitr   )r   r+   r+   r,   check_python_version  s   r   r   tuple[int, int, int]c                 C  s@   dd | D }dd |D }dd | D }t |t |t |fS )zDCount total number of errors, notes and error_files in message list.c                 S     g | ]}d |v r|qS ): error:r+   r   er+   r+   r,   r         zcount_stats.<locals>.<listcomp>c                 S  s   h | ]	}| d d qS ):r   )rM   r   r+   r+   r,   	<setcomp>  s    zcount_stats.<locals>.<setcomp>c                 S  r   ): note:r+   r   r+   r+   r,   r     r   rx   )r   r   error_filesnotesr+   r+   r,   count_stats  s   r  msgc                 C  sV   d}g }d}| D ]}|dkr|r| | d}q|dkr| }||7 }q| | |S )z=Split line of text into words (but not within quoted groups).r   T ")r7   )r  	next_wordresallow_breakcr+   r+   r,   split_words  s   


r	  c                   C  s   t tddpt jptS )zIGet current terminal width if possible, otherwise return the default one.MYPY_FORCE_TERMINAL_WIDTH0)rt   r   getenvshutilget_terminal_sizecolumnsr   r+   r+   r+   r,   get_terminal_width  s
   r  first_offset
num_indentc           
      C  s   t | }|d}g }|r8|d}|r|| n|| }t|t| d |kr/|d| 7 }n|| |}|s|| dd|  }	|	|S )a  Wrap a long error message into few lines.

    Breaks will only happen between words, and never inside a quoted group
    (to avoid breaking types such as "Union[int, str]"). The 'first_offset' is
    the width before the start of first line.

    Pad every next line with 'num_indent' spaces. Every line will be at most 'max_len'
    characters, except if it is a single word or quoted group.

    For example:
               first_offset
        ------------------------
        path/to/file: error: 58: Some very long error message
            that needs to be split in separate lines.
            "Long[Type, Names]" are never split.
        ^^^^--------------------------------------------------
        num_indent           max_len
    r   r5   r  r|   )r	  poprD   r7   rC   )
r  rs   r  r  words	next_liner   r  max_line_lenpaddingr+   r+   r,   	soft_wrap  s   



	
r  datac                 C  s   t |  S )zCompute a hash digest of some data.

    We use a cryptographic hash because we want a low probability of
    accidental collision, but we don't really care about any of the
    cryptographic properties.
    )hashlibsha256	hexdigest)r  r+   r+   r,   hash_digest  s   	r  cupc                 C  sH   t jdkr	J dd| dd  dg}t|dd	d
 }|S )z.Reproduce a gray color in ANSI escape sequencewin32Fz"curses is not available on Windowsr   NrK   mr   r5   r   )r   r   rC   rY   cursestparmr   )r  	set_colorgrayr+   r+   r,   parse_gray_color  s
   
r%  c                  C  s>   t dt dd} ztt| W S  ty   t|  Y S w )NMYPY_FORCE_COLORFORCE_COLORr  )r   r  r&   rt   
ValueError)env_varr+   r+   r,   should_force_color(  s   r*  c                   @  s   e Zd ZdZd7d	d
Zd8ddZd8ddZd8ddZ			d9d:ddZ	d;d<d d!Z	d=d#d$Z
d>d&d'Zd?d)d*Zd@dAd/d0Zdd+d1dBd5d6ZdS )CFancyFormatterzcApply color and bold font to terminal output.

    This currently only works on Linux and Mac.
    f_outIO[str]f_errhide_error_codesr&   r'   r   c                 C  s   || _ tjdvrd| _d S t s| r| sd| _d S tjdkr)|   | _ntjdkr5|   | _n|   | _| jsM| j	| j
| j| jdd| _d S d S )N)linuxdarwinr  
emscriptenTr  r2  r   )redgreenblueyellownone)r/  r   r   
dummy_termr*  isattyinitialize_win_colorsinitialize_vt100_colorsinitialize_unix_colorsREDGREENBLUEYELLOWcolors)r   r,  r.  r/  r+   r+   r,   r   6  s(   


zFancyFormatter.__init__c                 C  sB   t jdv sJ d| _d| _d| _d| _d| _d| _d| _d	| _	d
S )SReturn True if initialization was successful and we can use colors, False otherwise)r  r2  z[1mz[4mz[94mz[92mz[91mz[93mz[0mz[2mT)
r   r   BOLDUNDERr?  r>  r=  r@  NORMALDIMr   r+   r+   r,   r;  N  s   z&FancyFormatter.initialize_vt100_colorsc                 C  s   t jdksJ t jdkr?t  }|jtk s|jtk rdS ddl}|jj	}d}d}d}d}|
||||B |B  |   d	S dS )
rB  r  Fr   Nr5   rT   r   iT)r   r   getwindowsversionmajorr   buildr   ctypeswindllkernel32SetConsoleModeGetStdHandler;  )r   winverrJ  rL  ENABLE_PROCESSED_OUTPUTENABLE_WRAP_AT_EOL_OUTPUT"ENABLE_VIRTUAL_TERMINAL_PROCESSINGSTD_OUTPUT_HANDLEr+   r+   r,   r:  \  s.   


z$FancyFormatter.initialize_win_colorsc                 C  s^  t jdksts	dS z7zt j }W n' tjy8   tdd}tj	| d W d   n1 s1w   Y  Y nw tj	|d W n tj
yK   Y dS w td}td}td	}td
}td}|ro|ro|ro|ro|sqdS | | _| | _| | _t|| _t|tj | _t|tj | _t|tj | _t|tj | _dS )rB  r  Fz	/dev/nullrb)fdNboldsmulsetafr  sgr0T)r   r   CURSES_ENABLEDr   filenoioUnsupportedOperationr   r!  	setuptermerrortigetstrrY   rE  rC  rD  r%  rF  r"  
COLOR_BLUEr?  COLOR_GREENr>  	COLOR_REDr=  COLOR_YELLOWr@  )r   rU  r   rV  underr#  set_eseqnormalr+   r+   r,   r<  z  s@   








z%FancyFormatter.initialize_unix_colorsFrQ   r$   color1Literal['red', 'green', 'blue', 'yellow', 'none']rV  	underlinedimc                 C  sN   | j r|S |r| j}nd}|r|| j7 }|r|| j7 }|| j|  | | j S )z2Apply simple color and style (underlined or bold).r   )r8  rC  rD  rF  rA  rE  )r   rQ   rh  rV  rj  rk  startr+   r+   r,   style  s   	

zFancyFormatter.styleNr   r3   fixed_terminal_width
int | Nonec                 C  sZ  |pt  }| }t|D ]\}}d|v r3|jddd\}}t||t|td d}|d | ||< |dt rd|vr|td	 }||d  }	|	d}
|
t }d
|	vrZd}n|	|
|		d
d  }|t d }t
|||t\}}dt | ||< dt| |  | }t|t|| krt|dkr|d	t|| d  d }|||d < q|S )zHImprove readability by wrapping error messages and trimming source code.r   error:r5   maxsplitzerror: )r  r  ^N~   r   rw   )r  copyr}   rM   r  rD   r)   r   indexrindexrz   r   )r   r   rn  widthnew_messagesr   r_  locr  marker_linemarker_columncolumnmarkerrs   source_linery   new_marker_liner+   r+   r,   fit_in_terminal  s0   

 zFancyFormatter.fit_in_terminalr_  c                 C  s  d|v rL|j ddd\}}| jr|| jdddd | | S |d}|d	kr5||d
 }|d
| }nd}|| jdddd | | | |d S d|v rk|j ddd\}}| | |}|| dd | S |dt rd|vr~| j|dddS | |dS |S )zBColorize an output line by highlighting the status and error code.r   rp  r5   rq  r3  TrV  [rK   Nr   r6  r   znote:r5  r  rs  r7  )rk  )rM   r/  rm  highlight_quote_groupsrfindunderline_linkr)   r   )r   r_  r{  r  codeposcode	formattedr+   r+   r,   colorize  s6   

zFancyFormatter.colorizer  c                 C  sp   | dd r	|S |d}d}t|D ]!\}}|d dkr'|| |d7 }q|| jd| d ddd7 }q|S )zMake groups quoted with double quotes bold (including quotes).

        This is used to highlight types, attribute names etc.
        r  rT   r   r   r7  Tr  )countrM   r}   rm  )r   r  r   r8   r   partr+   r+   r,   r    s   
z%FancyFormatter.highlight_quote_groupsnotec                 C  sT   t d|}|s
|S | }| }|d| | j||| ddd ||d  S )zuUnderline a link in a note message (if any).

        This assumes there is at most one link in the message.
        zhttps?://\S*Nr7  T)rj  )researchrl  endrm  )r   r  rW   rl  r  r+   r+   r,   r  
  s   0zFancyFormatter.underline_linkT	n_sourcesrt   	use_colorc                 C  s,   d| dt | }|s|S | j|dddS )zFormat short summary in case of success.

        n_sources is total number of files passed directly on command line,
        i.e. excluding stubs and followed imports.
        zSuccess: no issues found in  source filer4  Tr  plural_srm  )r   r  r  r  r+   r+   r,   format_success  s   zFancyFormatter.format_success)blockersr  n_errorsn_filesr  c             	   C  sd   d| dt | d| dt | }|r|d7 }n|d| dt | d7 }|s*|S | j|d	d
dS )z)Format a short summary in case of errors.zFound z errorz in z filez$ (errors prevented further checking)z
 (checked r  )r3  Tr  r  )r   r  r  r  r  r  r  r+   r+   r,   format_error!  s   $

zFancyFormatter.format_error)r,  r-  r.  r-  r/  r&   r'   r   r'   r&   )FFF)rQ   r$   rh  ri  rV  r&   rj  r&   rk  r&   r'   r$   r   )r   r3   rn  ro  r'   r3   )r_  r$   r'   r$   )r  r$   r'   r$   )r  r$   r'   r$   )T)r  rt   r  r&   r'   r$   )r  rt   r  rt   r  rt   r  r&   r  r&   r'   r$   )rb   rc   rd   re   r   r;  r:  r<  rm  r  r  r  r  r  r  r+   r+   r+   r,   r+  0  s&    



)
%
 
r+  typeshed_dirfilec                 C  sD   | d ur| nt } ztj| tj|f| kW S  ty!   Y dS w )NF)r   r   rk   
commonpathr   r(  )r  r  r+   r+   r,   is_typeshed_file5  s   r  c                 C  s0   |  dsdS tdd tjtj| D S )Nz.pyiFc                 s  s    | ]}| d V  qdS )z-stubsN)r*   )r   	componentr+   r+   r,   	<genexpr>A  s    z'is_stub_package_file.<locals>.<genexpr>)r*   anyr   rk   rM   r   )r  r+   r+   r,   is_stub_package_file=  s   
"r  c                 C  s   | d uo| dkS r.   r+   r0   r+   r+   r,   unnamed_functionD  s   r  t0c                 C  s   t t |  d S )Ni  )rt   r   perf_counter_ns)r  r+   r+   r,   time_spent_usK  s   r  sint | Sizedc                 C  s&   t | tr| nt| }|dkrdS dS )Nr5   r  r   )
isinstancert   rD   )r  r  r+   r+   r,   r  O  s   r  docstrc                 C  sh   d tdt| }|dr.d|dd vr(|d dkr(d|dd  dS d	| d	S d
| d
S )zKReturns docstring correctly encapsulated in a single or double quoted form.r|   z(?<=[^\\])\\nr   r  r5   rK   z"""z''z"")rC   r  rM   r_   r)   )r  docstr_reprr+   r+   r,   quote_docstringW  s   
r  )F)r#   r$   r%   r&   r'   r&   )r#   r$   r'   r&   )r2   r$   r'   r3   )r:   r;   r<   r$   r'   r=   )r:   r;   r<   r$   r'   rB   )rH   rI   r'   r$   )rQ   rR   r'   rS   )r^   rR   r'   r$   )rf   rR   r'   r$   )rk   r$   rl   rm   r'   rn   )
rZ   r$   rs   rt   ru   rt   rv   rt   r'   rS   )rf   r$   r'   r{   )r   r   r   r&   r   r   r   r$   r   r$   r'   r$   )r   r   r   r&   r   r   rk   r$   r   r$   r   r$   r'   r   )r   r$   r'   r$   )
r   r$   r   rt   r<   r$   r   r&   r'   r   )r   r   r'   r   )Fr+   )
r   rI   r   rI   r   r&   r   r   r'   r   )r   r$   r   r$   r'   r&   )r   )r   rt   r'   r   )r#   r$   r'   r$   )r#   r$   r   r   r'   r$   )r   r$   r'   r   )r   r3   r'   r   )r  r$   r'   r3   )r'   rt   )
r  r$   rs   rt   r  rt   r  rt   r'   r$   )r  rR   r'   r$   )r  rR   r'   r$   r  )r  r=   r  r$   r'   r&   )r  r$   r'   r&   )r#   r=   r'   r&   )r  rt   r'   rt   )r  r  r'   r$   )r  r$   r'   r$   )_re   
__future__r   r  r\  r   r   r  r  r   r   	importlibr   importlib_resourcestypingr   r   r   r   r   r	   r
   r   typing_extensionsr   r!  _cursesrZ  ImportErrorr   r   r$   filesr   __annotations__rk   	_resourceparentcompiler   r   r   r   r   r   	frozensetr"   r-   r1   r9   rA   r?   rP   r]   r`   	Exceptionra   rj   rr   rz   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r  r	  r  r  r  r%  r*  r+  r  r  r  r  time_refr  r  r  r+   r+   r+   r,   <module>   s    (











 

2



 







	
$

	  




