ML i xUddlmZddlZddlZddlZddlmZddlm Z m Z ddl m Z ddl mZmZmZmZmZmZddlmZmZmZddlmZdd lmZdd lmZm Z m!Z!m"Z"m#Z#dd l$m%Z%dd l&m'Z'dd l(m)Z)ddl*m+Z+ddl,m-Z-m.Z.ddl/m0Z1edZ2ejfejhhZ5de6d<ejnejpejrejtejvejxejzhZ>de6d<dZ?de6d<ejejnejejniZBde6d<GddZCeDeeEeFeFeFeFeEeEee"fZGde6d<GddZHGddZIGd d!eHZJGd"d#ZKGd$d%eLZMd+d&ZN d, d-d'ZOGd(d)ZPeDeEeFeFfZQd.d*ZRy)/) annotationsN) defaultdict)IterableIterator)chain)CallableFinalNoReturnOptionalTextIOTypeVar)LiteralSelf TypeAlias) errorcodes)ErrorFormatter)IMPORTIMPORT_NOT_FOUNDIMPORT_UNTYPED ErrorCodemypy_error_codes)Context)Options)Scope)Type)DEFAULT_SOURCE_OFFSETis_typeshed_file) __version__Tr SHOW_NOTE_CODESHIDE_LINK_CODESz.https://mypy.rtfd.io/en/stable/_refs.html#code BASE_RTD_URLoriginal_error_codesceZdZUdZded<dZdZded<dZded<dZded <d Z d Z d Z d Z dZ dZdZd ed <d Zd Zded<dZded<d ZdZded<ddd dd ddZy) ErrorInfoz)Representation of a single error message.list[tuple[str, int]] import_ctxN str | Nonemoduletypefunction_or_memberrErrorCode | NonecodeFztuple[str, Iterable[int]]origintargetErrorInfo | None parent_error)r/r0priorityr2c*||_||_||_||_||_||_||_||_| |_| |_ | |_ | |_ | |_ ||_ |xs||gf|_||_||_| | dk(sJd||_y)Nnotez$Only notes can specify parent errors)r'filer*r+r,linecolumnend_line end_columnseveritymessager.blocker only_oncer/r0r3r2)selfr'r6r*typr,r7r8r9r:r;r<r.r=r>r/r0r3r2s Q/mnt/ssd/data/python-lab/Trading/venv/lib/python3.12/site-packages/mypy/errors.py__init__zErrorInfo.__init__ps,%   "4    $     ".v     #v% M'M M%()&r'r&r6strr*r)r@r)r,r)r7intr8rEr9rEr:rEr;rDr<rDr.r-r=boolr>rFr/z tuple[str, Iterable[int]] | Noner0r)r3rEr2r1returnNone)__name__ __module__ __qualname____doc____annotations__r6r*r+r,r7r8r9r:r;r<r.r=r>r0hiddenr2rBrCrAr%r%3su3&% DFJD*&( ' DFHJHG"D !GI &%FJF&*L")&48!)-)))))) ))  ))  ))')))))))))))))))))) !))"1#))$%))&'))(')))* +))rCr% _TypeAlias ErrorTuplecneZdZUdZded<ddddd d dZddZddZdd Zdd Z dd Z y ) ErrorWatchera2Context manager that can be used to keep track of new errors recorded around a given operation. Errors maintain a stack of such watchers. The handler is called starting at the top of the stack, and is propagated down the stack unless filtered out by one of the ErrorWatcher instances. rFfilter_revealed_typeF) filter_errorssave_filtered_errorsfilter_deprecatedrTcl||_d|_||_||_||_|rg|_yd|_yNF)errors_has_new_errors_filter_filter_deprecatedrT _filtered)r?rZrUrVrWrTs rArBzErrorWatcher.__init__s: $$ "3$8!7KQUrCcP|jjj||SN)rZ _watchersappendr?s rA __enter__zErrorWatcher.__enter__s $$T* rCcZ|jjj}||k(sJyrY)rZrapop)r?exc_typeexc_valexc_tblasts rA__exit__zErrorWatcher.__exit__s){{$$((*t||rCc|jtjk(r |jsyd|_t |j tr |j }nIt|j r|j ||}n!tdt|j |r'|j|jj||S)aHandler called when a new error is recorded. The default implementation just sets the has_new_errors flag Return True to filter out the error, preventing it from being seen by other ErrorWatcher further down the stack and from being recorded by Errors FTzinvalid error filter: ) r.codes DEPRECATEDr]r[ isinstancer\rFcallableAssertionErrorr+r^rb)r?r6info should_filters rAon_errorzErrorWatcher.on_errors 99(( (**# dllD ) LLM dll # LLt4M #9$t||:L9M!NO O T^^7 NN ! !$ 'rCc|jSr`)r[rcs rAhas_new_errorszErrorWatcher.has_new_errorss###rCc6|jJ|jSr`)r^rcs rAfiltered_errorszErrorWatcher.filtered_errorss~~)))~~rCN) rZErrorsrU'bool | Callable[[str, ErrorInfo], bool]rVrFrWrFrTrFrGrH)rGr)rgobjectrhr{rir{rGzLiteral[False]r6rDrrr%rGrFrGrF)rGlist[ErrorInfo]) rIrJrKrLrMrBrdrkrtrvrxrOrCrArSrSs~ BG%*"'%*VV? V # V  V#V V  2$rCrScHeZdZUdZded<ded<ded<d dZd d Zdd Zy )IterationDependentErrorsaAn `IterationDependentErrors` instance serves to collect the `unreachable`, `redundant-expr`, and `redundant-casts` errors, as well as the revealed types, handled by the individual `IterationErrorWatcher` instances sequentially applied to the same code section.z4list[set[tuple[ErrorCode, str, int, int, int, int]]]uselessness_errorszlist[set[int]]unreachable_linesz9dict[tuple[int, int, int | None, int | None], list[Type]]revealed_typescHg|_g|_tt|_yr`)rrrlistrrcs rArBz!IterationDependentErrors.__init__s"$!#)$/rCc#`Kt}tt|jD]Ftfdt |j|j Ds6|j H|D]6}t|d|d}|d|_|d|_ |d||df8y w) zReport only those `unreachable`, `redundant-expr`, and `redundant-casts` errors that could not be ruled out in any iteration step.c3>K|]\}}|vxsd|vyw)NrO).0rZlines candidates rA zIIterationDependentErrors.yield_uselessness_error_infos..s3!FEf$@)A,%*?@srr7r8rN) setrrallzipraddrr9r:)r?persistent_uselessness_errors error_infocontextrs @rAyield_uselessness_error_infosz6IterationDependentErrors.yield_uselessness_error_infoss),%UD$;$;<= =I%()@)@$BXBX%Y.11)<  = 8 8J:a=AGG)!}G !+AG Q-*Q-7 7  8s AB.AB.c#K|jjD]2\}}t|d|d}|d|_|d|_||f4yw)z8Yield all types revealed in at least one iteration step.rrrrrN)ritemsrr9r:)r? note_infotypesrs rAyield_revealed_type_infosz2IterationDependentErrors.yield_revealed_type_infossa!% 3 3 9 9 ; ! Iu9Q< ! EG(|G !*1G .  !sAANrGrH)rGz(Iterator[tuple[str, Context, ErrorCode]])rGz$Iterator[tuple[list[Type], Context]])rIrJrKrLrMrBrrrOrCrArrs0ML&% NM0 8"!rCrc\eZdZUdZded<dddd dfdZd fd ZxZS) IterationErrorWatcherzError watcher that filters and separately collects `unreachable` errors, `redundant-expr` and `redundant-casts` errors, and revealed types when analysing code sections iteratively to help avoid making too-hasty reports.riteration_dependent_errorsFrUrVrWct|||||||_|jj t |j j t y)Nr)superrBrrrbrr)r?rZrrUrVrW __class__s rArBzIterationErrorWatcher.__init__#sZ  '!5/  +E'"55<Z'd^d?Z(dVd@Z)dedAZ*d^dBZ+dfdgdCZ, dhdDZ-dQdidEZ.djdFZ/dkdGZ0dldHZ1dmdIZ2dndJZ3dndKZ4dndLZ5y )oryzContainer for compile errors. This class generates and keeps tracks of compile errors and the current error context (nested imports). zdict[str, list[ErrorInfo]]error_info_mapset[str] has_blockers flushed_filesr&r'Nr) ignore_prefixr(rDr6zdict[str, dict[int, list[str]]] ignored_lineszdict[str, set[int]] skipped_linesused_ignored_lines ignored_filesonly_once_messagesFrFshow_error_contextshow_column_numbersshow_error_endshow_absolute_path target_module Scope | Nonescopezlist[ErrorWatcher]ra) read_sourcehide_error_codescj||_||n |j|_||_|jyr`)optionsrr initialize)r?rrrs rArBzErrors.__init__s8 0 < 'BZBZ ' rCci|_t|_g|_dg|_i|_i|_td|_t|_ t|_ t|_ d|_ d|_ d|_g|_y)Nc ttSr`)rrrOrCrAz#Errors.initialize..s k$6GrCF)rrrr'r,rrrrrrrrrseen_import_errorrarcs rArzErrors.initializes  U#'&"-.G"H U"%%E !!&rCc$|jyr`)rrcs rAresetz Errors.resets  rCctjj|}tjj|dk7r|tjz }||_y)z4Set path prefix that will be removed from all paths.r(N)ospathnormpathbasenamesepr)r?prefixs rAset_ignore_prefixzErrors.set_ignore_prefixsC!!&) 77  F #r ) bff F#rCc|jjrtjj |Stjj |}t ||jSr`)rrrrabspathrremove_path_prefixrr?r6s rA simplify_pathzErrors.simplify_pathsI << * *77??4( (77##D)D%dD,>,>? ?rCc<||_||_||_||_y)z/Set the path and module id of the current file.N)r6rrr)r?r6r*rrs rAset_filezErrors.set_files! #  rCc^||j|<|r|jj|yyr`)rrr)r?r6r ignore_alls rAset_file_ignored_lineszErrors.set_file_ignored_liness0$14     " "4 ( rCc"||j|<yr`)r)r?r6rs rAset_skipped_lineszErrors.set_skipped_liness#04 rCcf|j|jjS|jS)zxRetrieves the current target from the associated scope. If there is no associated scope, use the target module.)rcurrent_targetrrcs rArzErrors.current_targets- :: !::,,. .!!!rCc|jSr`)rrcs rAcurrent_modulezErrors.current_modules!!!rCc6|jjS)z$Return a copy of the import context.)r'copyrcs rAimport_contextzErrors.import_contexts##%%rCc.|j|_y)z3Replace the entire import context with a new value.N)rr')r?ctxs rAset_import_contextzErrors.set_import_contexts((*rCerrorr) r=r;r6r> origin_spanoffsetr9r:r2c |jrP|jj}|jjdkDrd}|jj}nd}d}|d}| |dk(rd} n|dz} | |j}| rd| z|z}| |g} | |} |xs| r | j nd}|xs|st jnd}tdid|jd|d|jd |d |d |d |d | d| d|d|d|d|d|d|j| fd|jd| }|j||S)a*Report message at the given line using the current error context. Args: line: line number of error column: column number of error message: message to report code: error code (defaults to 'misc'; not shown for notes) blocker: if True, don't continue analysis after this error severity: 'error' or 'note' file: if non-None, override current file as context only_once: if True, only report this exact message once per build origin_span: if non-None, override current context as origin (type: ignores have effect here) end_line: if non-None, override current context as end parent_error: an error this note is attached to (for notes only). rNrr r'r6r*r@r,r7r8r9r:r;r<r.r=r>r/r0r2rO) rcurrent_type_nameignoredcurrent_function_namer6r.rmMISCr%rrradd_error_info)r?r7r8r<r.r=r;r6r>rrr9r:r2r+functionrrs rAreportz Errors.reportsB :::://1Dzz!!A%zz779HDH >F  | #aZ <99D FlW,G  &K  HD\ ))t<' t **,  &&(   (      "       II{+ &&(! "&# & D! rCcX||jvsJ|j||ry||jvrg|j|<|j|j||jr|j j ||jtttfvrd|_ yy)NT) r _filter_errorrrbr=rrr.rrrrr?r6rrs rA_add_error_infozErrors._add_error_info?s4-----   dD )  t** *(*D   % D!((. <<    ! !$ ' 991AB B%)D " CrCc#zKt|j}|dkDr|dz}|j||dkDryyw)z2Yield the `ErrorWatcher` stack from top to bottom.rrN)lenra)r?is rA get_watcherszErrors.get_watchersMs<  !e FA..# #!es6;;cLtfd|jDS)zy process ErrorWatcher stack from top to bottom, stopping early if error needs to be filtered out c3BK|]}|jywr`)rt)rwr6rrs rArz'Errors._filter_error..YsGa1::dD)Gs)anyrrs ``rArzErrors._filter_errorTs G43D3D3FGGGrCc|j\}}|j||ry|js||jvr|D]}|j |||j|s$|j xst j}|j|sy|j||j|j y||jvry|jr>|j|jvry|jj|j|j rE|j t"t$t&fvr(|j)rd|_|j-||j/|||jj1|ij1|j2g}|r|j rd|j j d}|j t4vr>t4|j j }||vrd|j j ddz}t7|j8|j:|j<|j>|j@|j2|jB|jD|jFd|ddd } |j/|| |jHjJr2|jHjLs|j  |j tNvr|j j tPvrd tRd |j j d } | |jvry|jj| t7|j8|j:|j<|j>|j@|j2|jB|jD|jFd| |j ddd }|j/||yyyyyy)NTz Error code "z'" not covered by "type: ignore" commentzError code changed to z; "type: ignore" comment zmay be out of dater5F)r'r6r*r@r,r7r8r9r:r;r<r.r=r>zSee -z for more info)r'r6r*r@r,r7r8r9r:r;r<r.r=r>r3)*r/rr=ris_ignored_errorr.rmris_error_code_enabledrrbrr>r<rrrrrrhas_many_errorsrNreport_hidden_errorsrgetr7r#r%r'r6r*r+r,r8r9r:rshow_error_code_linksrr!rr") r?rrr6r scope_lineerr_code ignored_codesmsgold_coder5r<s rArzErrors.add_error_info[s`kk e   dD ) ||t)))#( J,,Zt?Q?QRV?WX#'99#: #99(C#//5jAHHW t))) >>||t666  # # ' ' 5  " " &.:J!KK$$&DK  % %d + T4(**..tR8<JG$111  # # ' ' 0??YY{{II#'#:#:YY{{??YYD"  t ,/31&2 /rCc|jjdkryt|j|jjk\ryt d|jj D|jjk\ryy)NrFTc32K|]}t|ywr`r)rrZs rArz)Errors.has_many_errors..sGF G)rmany_errors_thresholdrrsumvaluesrcs rAr zErrors.has_many_errorssn << - - 1 t"" #t||'I'I I G$*=*=*D*D*FG G||11 2rCcd}||jvry|jj|tdid|jd|jd|j ddddd|j d|jd |jd |jd d d |ddddddd|jd|j}|j|jd|y)Nz\(Skipping most remaining errors due to unresolved imports or missing stubs; fix these first)r'r6r*r@r,r7r8r9r:r;r5r<r.r=Fr>Tr/r0rrO) rrr%r'r6r*r7r8r9r:r/r0r)r?rrr<new_infos rAr zErrors.report_hidden_errorss !  d-- -  ##G,   ;;   $    ;; ]]       ;; ;;! $ T[[^X6rCc|jry|jr|j|jsy||vry||sy|jrw|j|jr\|jj||vxs?|jjduxr%|jjj||vSyNFT)r=r.r sub_code_of)r?r7rrignoress rArzErrors.is_ignored_errors << 99T77 B w t} 9933DII> '$-/@99((4@II))..'$-?  rCc|jr-|jj}|jj}nt}t}||vry||vry|j|j|vry|j Sr)rdisabled_error_codesenabled_error_codesrrdefault_enabled)r? error_codecurrent_mod_disabledcurrent_mod_enableds rArzErrors.is_error_code_enabledsz <<#'<<#D#D "&,,"B"B #&5 "%%  - - . .  # # /J4J4JNb4b-- -rCc||jvrg}d}|j|D]c}|j|vr!|j|||jz}2|js?|j j |je||j|<|s+||jvr|jj |yyyy)z=Remove errors in specific fine-grained targets within a file.FN) rr0rbr=r>rremover<r)r?rtargets new_errors has_blockerrrs rAclear_errors_in_targetszErrors.clear_errors_in_targets s 4&& &JK++D1 A;;g-%%d+4<</K^^++224<<@  A )3D   %44+<+<#<!!((.$=; 'rCct|jr|jjnd|s||jvry|j|}|j |}|j D]a\}}||j|vrtjj|vr6||}t|t|z }|s|rW|r|s\d}t|dkDr |rddjt|d}d|d} |D]?} t|tj| z} | s%| ddj| d | d z } At!did |j#d |d |j%ddddd|ddd|ddddd| dtjddddd|j&|gfd|j(} |j+|| dy)Nr(r[, ]zUnused "type: ignorez " commentz, use narrower [z] instead of [z] coder'r6r*r@r,r7r8rr9r:r;rr<r.r=Fr>r/r0rO)rrabs_custom_typeshed_dirrrrrrrm UNUSED_IGNOREr.rrjoinsorted sub_code_mapr%rrr6rr) r?r6rrr7rused_ignored_codesunused_ignored_codesunused_codes_messager<unusednarrowerrrs rAgenerate_unused_ignore_errorsz$Errors.generate_unused_ignore_errorssO T\\T\\AAW[]a bt))) **40 !44T:#0#6#6#8) - D-t))$//""''=8!3D!9 #&}#5)*499Vr/r0rO)rrr0rrminrrmFILEr.rr3rr2r%rrIGNORE_WITHOUT_CODEr6rr) r?r6is_warning_unused_ignoresr_ used_codesr7r codes_hintr<rrs rA#generate_ignore_without_code_errorsz*Errors.generate_ignore_without_code_errorsOs T\\T\\AAW[]a bt))) !44T:  2 8 8 :;MAzzz*,#'#5#5d#;#A#A#C" - D-)1CD1IJ"3'9$'?#@AM8=9Q8RR]^ A*NG..0**,  $(   ! ..  D6* ))!D$  t ,E" -rCcVtd|jjDS)z(Return the number of generated messages.c32K|]}t|ywr`r)rxs rArz&Errors.num_messages..s@a3q6@r)rrrrcs rA num_messageszErrors.num_messagess"@4#6#6#=#=#?@@@rCc,t|jS)z!Are there any generated messages?)rFrrcs rA is_errorszErrors.is_errorssD''((rCc,t|jS)z%Are the any errors that are blockers?)rFrrcs rA is_blockerszErrors.is_blockerssD%%&&rCc|jD]2}|j|D]}|js|jccS4y)zAReturn the module with a blocking error, or None if not possible.N)rrr=r*)r?rerrs rAblocker_modulezErrors.blocker_modulesG%% &D**40 &;;::% & &rCc>||jvxr||jvS)z(Are there any errors for the given file?)rrrs rAis_errors_for_filezErrors.is_errors_for_files#t***Mt4;M;M/MMrCc|j|jvry|jr*|jd}|jdur |jyy)a7Should we generate simple/fast error messages? Return True if errors are not shown to user, i.e. errors are ignored or they are collected for internal use only. If True, we should prefer to generate a simple message quickly. All normal errors should still be reported. TrF)r6rrar\r^)r?_watchers rAprefer_simple_messageszErrors.prefer_simple_messagessM 99** * >>~~b)H4'H,>,>,FrCcVt|j||j)zpRaise a CompileError with the generated messages. Render the messages suitable for displaying. ) use_stdoutmodule_with_blocker) CompileError new_messagesrN)r?rUs rA raise_errorzErrors.raise_errors*    JDL_L_La  rCc g}|D]\}}}}}} } } d} |s|jjrC|dk\r>|dk\r9|d|dd|z} |jjr%|dk\r |dk\r| d|d|z } n|dk\r|d|} n|} | d| d| } n| } |js!| r| dk7s| tvr| d| j d } |j | |jjs| d k(s|s|dkDs||dz }|j}|dkr%t|t|jz }t|d|j}t|d|j}|j d tz|zd }||k(r||kDrd d ||z dz z}|j d t|zz|z|S)zReturn a string list that represents the error messages. Use a form suitable for displaying to the user. If self.pretty is True also append a relevant trimmed source code line (only for severity 'error'). r(Nr:r: r5z [r/rr^~) rrrrr r.rbpretty expandtabsrlstripr)r? error_tuples source_linesar6r7r8r9r:r;r<r.ssrcloc source_linesource_line_expandedmarkers rAformat_messageszErrors.format_messagessQ]* N MD$*hA<<33 fPQk $vQtfAa&j\:F||22x1}WXAhZq "==QY $vQtf-F!Fhb "WI6))'4?+BcTYYKq) HHQK||""w&,>z,JK ++J7  "<0F;ABCI**3/B B t$ <<  4#3#377=K#// < #//5 ##L,??%F CsD D >D%c|jjy|jjD]}|d|k(s |dcSy)zAReturn the shadow file path for a given source file path or None.Nrr)r shadow_file)r?rrs rArqzErrors.find_shadow_file_mappingsG << # # +)) Att|t  rCcg}|jjD]1}||jvs|j|j |3|S)zReturn a string list of new error messages. Use a form suitable for displaying to the user. Errors from different files are ordered based on the order in which they first generated an error. )rkeysrextendrt)r?msgsrs rArXzErrors.new_messagessS'',,. 6D4--- D..t45 6 rCc|jjDchc]"}|D]}|js|j$c}}Scc}}w)z0Return a set of all targets that contain errors.)rrr0)r?errsrrs rAr(zErrors.targets%sO %)$7$7$>$>$@  T EIUYU`U`DKK    s A A c g}g}d}d}|D]}|jjsn|j|k7rt|jdz }|}|dk\ru|j|\} } d} ||krd} |dkDr| dz } n| dz } t | |j } |j dddddd | j| | df|dz}|dk\ru|j|j} |jjsnF|j|k7s|j|k7r|jN|j|j | ddddd d dfn|j | ddddd d |jd dfn|j(|j | ddddd d |jd dfn|j | ddddd dj|j|jdfn\|j|k7rM|j|j | ddddd d dfn'|j | ddddd d |jd df|j | |j|j|j|j|j |j"|j$f|j}|j}|j}|S)aETranslate the messages into a sequence of tuples. Each tuple is of form (path, line, col, severity, message, code). The rendered sequence includes information about error contexts. The path item may be None. If the line item is negative, the line number is not defined for the tuple. Nrrz${}:{}: note: In module imported herez{}:{}: note: ... from here,r[rr5z At top level:z In class "z":z In function "zIn member "{}" of class "{}":)rrr'rrrrbformatrr6r,r+r7r8r9r:r;r<r.) r?rZresultprev_import_contextprev_function_or_member prev_typeerjrrr7fmtr6s rArnzErrors.render_messages-s$&57.2 $ L A<<22!441<<(1,1f!"aJD$@C4x:1us s .dD4F4FGDMM4RRDRVAWY]"^_FA1f%%aff-D<<22%%)@@AFFiDW''/vv~ tRRV_VZ&[\ !2r2r6Zxr;RTXYvv~ $ " " " " &"/0D0D/ER H $   $ " " " " & ? F F$%$8$8!&&!"!%  9$66>MM4RRRV"WXMM4RR:affXUWAXZ^"_` MMqvvqxxQ\\1::qyyZ[Z`Z`a #$,, &'&:&: #IYL \ rCcg}d}|t|kr|}|dzt|kr||dzj||jk(r}||dzj||jk(r[|dz }|dzt|krE||dzj||jk(r#||dzj||jk(r[|dz }t|||d}|j |}|j ||t|kr|S)zSort an array of error messages locally by line number. I.e., sort a run of consecutive messages with the same context by line number, but otherwise retain the general ordering of the messages. rrc2|j|jfSr`rrFs rArz&Errors.sort_messages..sAFFAHH3ErCkey)rr'r6r3sort_within_contextryr?rZrri0rds rArmzErrors.sort_messagess#% #f+oBAF #1q5M,,q 0D0DD1q5M&&&)..8Q AF #1q5M,,q 0D0DD1q5M&&&)..8 FAvb|)EFA((+A MM! #f+o rCcg}d}|t|kr|}|dzt|krn||dzj||jk(rK||dzj||jk(r(||dzj||jk(r||dzj||jk(r||dzj ||j k(r|dz }|dzt|kr||dzj||jk(r||dzj||jk(rg||dzj||jk(rE||dzj||jk(r#||dzj ||j k(r|dz }t |||d}|j||t|kr|S)zFor the same location decide which messages to show first/last. Currently, we only compare within the same error code, to decide the order of various additional notes. rrc|jSr`)r3rs rArz,Errors.sort_within_context..s 1::rCr)rr7r8r9r:r.r3ryrs rArzErrors.sort_within_contexts  #f+oBAF #1q5M&&&)..81q5M((F1I,<,<<1q5M**fQi.@.@@1q5M,,q 0D0DD1q5M&&&)..8QAF #1q5M&&&)..81q5M((F1I,<,<<1q5M**fQi.@.@@1q5M,,q 0D0DD1q5M&&&)..8 FAvb|)=>A MM! !#f+o" rCcg}tt}t}|D]}|j|j|!|j|j f||j vrF|j|||j j|j|j f|j||Dcgc]}|j|j|vr| c}Scc}wr`)rrr2rbr;r<r7r)r?rZrx seen_by_lineremovedrMs rArlzErrors.remove_duplicatess?J3?O % !C+&&s+,, ,L4JJ&&s+SXX&**CLL#+++FG C  !' '3+;+;7+J    s#C))rrrz(Callable[[str], list[str] | None] | Nonerz bool | NonerGrHr)rrDrGrH)r6rDrGrDr`) r6rDr*r)rrrrrGrH)F)r6rDrdict[int, list[str]]rrFrGrH)r6rDrzset[int]rGrH)rGr))rGr&)rr&rGrH)r7rEr8 int | Noner<rDr.r-r=rFr;rDr6r)r>rFrzIterable[int] | NonerrEr9rr:rr2r1rGr%)r6rDrrr%rGrH)rGzIterator[ErrorWatcher]r|)rrr%rGrHr})r7rErrr%rrrGrF)r#rrGrF)rrDr(rrGrH)r6rDrGrH)r6rDr?rFrGrH)rGrE)r6rDrGrF)T)rUrFrGr )rblist[ErrorTuple]rczlist[str] | NonerG list[str])rrDrrzErrorFormatter | NonerGr)rrDrGr))rGr)rGr)rZr~rGr)rZr~rGr~)6rIrJrKrLrMrr6rrrrrrrrBrrrrrrrrrrrrrrrrr r rrr+r:rCrGrIrKrNrPrSrYrjrtrqrXr(rnrmrrlrOrCrAryryGs /.&%!%M:$D#N32'&87!  %$!&%!ND  %$ !%M:$E<!! AE(,  >  &    $@VZ  !+ 6= FR    RW))(<)JN) )1""&%"& T,0#!%)-TTT T  TTTTT*TTTT'T !Tl *$Hd-L 78&." /1-f3-3-483- 3-jA)'N&  5,5&&( C #J   vQtfB'FvR[F (*+ *  LSYZ  K  Il^ $62{{ !/  q)*  ! !{{ ''-vf~  Q- $ $ &s +""3<<>!#45 23&&rCx0 "A !((4. ! " c##$Bse,6: :;&I Q-u > &Qf==>s G?? H*H%%H*c0eZdZ ddZy) MypyErrorcf||_||_||_||_||_||_g|_yr`) file_pathr7r8r< errorcoder;hints)r?rr7r8r<rr;s rArBzMypyError.__init__Js5#   "  " rCN)rrDr7rEr8rEr<rDrr-r;zLiteral['error', 'note']rGrH)rIrJrKrBrOrCrArrIsK### #  # $ #+# #rCrc Tg}i}|D]}|\}}}}}}} } ||dvsJ|dk(rW|||f} |j| } | #t|||| | d} |j| W| jj| st|||| | d} |j| |||f} | || <|S)N)rr5r5)r;r)r rrbr) rbrZlatest_error_at_location error_tuplerr7r8r@r;r<rerror_locationrs rAroro`s F@B#= FQC 4Ax)   ,,,, v 'v6N,00@E}!)T67IX^_ e$ KK  w 'ivw T[\E MM% 'v6N7< $^ 4+=. MrC)rrDrr)rGrD)NN)rMrr6r)r7rErZryrrr TextIO | NonerrrGr )rbrrGzlist[MypyError])S __future__ros.pathrrr collectionsrcollections.abcrr itertoolsrtypingrr r r r r typing_extensionsrrrrPmypyrrmmypy.error_formatterrmypy.errorcodesrrrrr mypy.nodesr mypy.optionsr mypy.scoper mypy.typesr mypy.utilrr mypy.versionrrrANNOTATION_UNCHECKEDrnr rMr ASSIGNMENTARG_TYPE RETURN_VALUE ATTR_DEFINED NAME_DEFINEDOVERRIDEr!r" LITERAL_REQ TYPE_ABSTRACTr#r%tuplerDrErQrSrrryrrWrrr_ErrorLocationrorOrCrArs" #.GGDD$/aa =4 CL 44e6F6FGG  JJ  NN    NN  G eF %00%**e>Q>QSXS]S]^e^f)f)Vx}c3S#sHU^L__` J`DDN1!1!h(,L(,VI I X7976 ! N N N N  N  N  N NNb##(sC}%rC