ML i. UdZddlmZddlmZddlmZddlmZiZ de d<ee Z de d <ed Gd d Z e dddZde d<e dddZde d<e dddZde d<e dddZde d<e dddZde d<e d d!dZde d"<e d#d$dZde d%<e d&d'dZde d(<e d)d*dZde d+<e d,d-dZde d.<e d/d0dZde d1<e d2d3de4Zde d5<e d6d7dZde d8<e d9d:dZde d;<e d<e d?d@dZde dA<e dBdCdZde dD<e dEdFdZde dG<e dHdIdZ de dJ<e dKdLdZ!de dM<e dNdOde!4Z"de dP<e dQdRdZ#de dS<e dTdUdZ$de dV<e dWdXde$4Z%de dY<e dZd[de$4Z&de d\<e d]d^dZ'de d_<e d`dadZ(de db<e dcdddZ)de de<e dfdgdZ*de dh<e didjdZ+de dk<e dldmdZ,de dn<e dodpdZ-de dq<e drdsdZ.de dt<e dudvdZ/de dw<e dxdydZ0de dz<e d{d|dZ1de d}<e d~ddZ2de d<e dddZ3de d<e dddZ4de d<e dddZ5de d<e dddZ6de d<e dddZ7de d<e dddZ8de d<e dddZ9de d<e dddZ:de d<e dddZ;de d<e dddZe ddddZ?de d<e ddddZ@de d<e ddddZAde d<e dddZBde d<e ddddZCde d<e dddZDde d<e dddZEde d<e ddddZFde d<e ddddZGde d<e ddddZHe dddZIde d<e ddddZJde d<e ddddZKde d<e ddddZLde d<e ddddZMde d<e ddddZNde d<e dddZOde d<e dddZPde d<e dddZQde d<e eQj=e dddZSde d<e dddeS4ZTde d<e dddeS4ZUde d<e dddeS4ZVe dddZWde d<e dddZXde d<e ddddZYde d<e jZ[y)zeClassification of possible errors mypy can detect. These can be used for filtering specific errors. ) annotations) defaultdict)Final) mypyc_attrzdict[str, ErrorCode] error_codeszdict[str, set[str]] sub_code_mapT)allow_interpreted_subclassescPeZdZ d ddZd dZd dZd dZd dZy) ErrorCodeNc||_||_||_||_||_|5|jJdt |jj ||t|<y)Nz&Nested subcategories are not supported)code descriptioncategorydefault_enabled sub_code_ofraddr)selfr rrrrs U/mnt/ssd/data/python-lab/Trading/venv/lib/python3.12/site-packages/mypy/errorcodes.py__init__zErrorCode.__init__sk &  .&  "**2 \4\ \2 )) * . .t 4 Dc"d|jdS)N )r rs r__str__zErrorCode.__str__%sTYYKq))rc<d|jd|jdS)zMThis doesn't fulfill the goals of repr but it's better than the default view.rz: r)rr rs r__repr__zErrorCode.__repr__(sT]]O2dii[::rcVt|tsy|j|jk(S)NF) isinstancer r )rothers r__eq__zErrorCode.__eq__,s"%+yyEJJ&&rc.t|jfS)N)hashr rs r__hash__zErrorCode.__hash__1sTYYL!!r)TN) r strrr%rr%rboolrzErrorCode | NonereturnNone)r'r%)r objectr'r&)r'int)__name__ __module__ __qualname__rrrr!r$rrr r s]!%(, !!! !  ! & ! !$*;' "rr z attr-definedzCheck that attribute existsGeneralr ATTR_DEFINEDz name-definedzCheck that name is defined NAME_DEFINEDzcall-argz3Check number, names and kinds of arguments in callszFinal[ErrorCode]CALL_ARGzarg-typezCheck argument types in callsARG_TYPEz call-overloadz0Check that an overload variant matches arguments CALL_OVERLOADz valid-typez%Check that type (annotation) is valid VALID_TYPEz var-annotatedz5Require variable annotation if type can't be inferred VAR_ANNOTATEDoverridez8Check that method override is compatible with base classOVERRIDEr'z*Check that function always returns a valueRETURNz return-valuez4Check that return value is compatible with signature RETURN_VALUE assignmentz3Check that assigned value is compatible with target ASSIGNMENTz method-assignz,Check that assignment target is not a method)r METHOD_ASSIGNztype-argz-Check that generic type arguments are presentTYPE_ARGztype-varz)Check that type variable values are validTYPE_VARz union-attrz3Check that attribute exists in each item of a union UNION_ATTRindexzCheck indexing operationsINDEXoperatorz)Check that operator is valid for operandsOPERATORz list-itemz1Check list items in a list expression [item, ...] LIST_ITEMz dict-itemz7Check dict items in a dict expression {key: value, ...} DICT_ITEMztypeddict-itemz'Check items when constructing TypedDictTYPEDDICT_ITEMztypeddict-unknown-keyz.Check unknown keys when constructing TypedDictTYPEDDICT_UNKNOWN_KEYzhas-typez.Check that type of reference can be determinedHAS_TYPEimportz6Require that imported module can be found or has stubsIMPORTzimport-not-foundz)Require that imported module can be foundIMPORT_NOT_FOUNDzimport-untypedz&Require that imported module has stubsIMPORT_UNTYPEDzno-redefz$Check that each name is defined onceNO_REDEFzfunc-returns-valuez;Check that called function returns a value in value contextFUNC_RETURNS_VALUEabstractz9Prevent instantiation of classes with abstract attributesABSTRACTz type-abstractz9Require only concrete classes where Type[...] is expected TYPE_ABSTRACTz valid-newtypez)Check that argument 2 to NewType is valid VALID_NEWTYPEz str-formatz7Check that string formatting/interpolation is type-safeSTRING_FORMATTINGzstr-bytes-safez?Warn about implicit coercions related to bytes and string types STR_BYTES_PY3z exit-returnz1Warn about too general return type for '__exit__' EXIT_RETURNzliteral-requiredzCheck that value is a literal LITERAL_REQzunused-coroutinez#Ensure that all coroutines are usedUNUSED_COROUTINEz empty-bodyzHA dedicated error code to opt out return errors for empty/trivial bodies EMPTY_BODYz safe-superz>Warn about calls to abstract methods with empty/trivial bodies SAFE_SUPERztop-level-awaitz&Warn about top level await expressionsTOP_LEVEL_AWAITzawait-not-asyncz2Warn about "await" outside coroutine ("async def")AWAIT_NOT_ASYNCzno-untyped-defz+Check that every function has an annotationNO_UNTYPED_DEFzno-untyped-callzLDisallow calling functions without type annotations from annotated functionsNO_UNTYPED_CALLzredundant-castz*Check that cast changes type of expressionREDUNDANT_CASTz assert-typez&Check that assert_type() call succeeds ASSERT_TYPEzcomparison-overlapzr?r@rBrDrErFrGrHrIrKrLrMrNrOrQrRrSrTrUrVrWrXrYrZr[r\r]r^r_r`rarbrcreANNOTATION_UNCHECKEDTYPEDDICT_READONLY_MUTATEDrfrgrhrirjrkrlrmrnREDUNDANT_SELF_TYPErorprqrrrsrtrvrxrzr r|r}r~PROPERTY_DECORATORrrrcopymypy_error_codesr.rrrsl ##&$& !&$/$4 !4 . " "/ "F 0MyY eY0LiX eX&Ey J(GS%S G u )99  !Li uJI%% :I"+JI"  )G  #,2  #  J(WYbc%cJ(SU^_%_G E"=yIuIJ(SU^_%_Di 5JI 5"? )4   u @)% F $CY\b%"> W]J(NPYZ%Z%WYbEKY%!PR[ u!@) u%KY5!WYb uF  U13RT]^ U^#=y% )N    RT] E#?#KY$-CY$ #R  "BI}.VXab Ub%XZcE%Ey5!H  u Ey U!RT]' "G(1H  ($ "8)UZ!*S  !  %.J %! %.\  %! Di E$O % 'H  U $/  %  I   %.SU^%!!  eX   E##%r