bgydZddlmZddlZddlZddlZddlZddlZddlm Z ddl m Z m Z ddl Z ddl mZmZmZddlmZmZddlmZmZmZdd lmZdd lmZejd Zejd Zejd krddl m Z nddl!m Z e r ddl mZddl"m#Z#dZ$e%e$Z&dZ'dMdZ(GddZ)Gdde)Z*Gdde)Z+Gdde)Z,Gdd e)Z-Gd!d"e)Z.Gd#d$e)Z/Gd%d&e+Z0Gd'd(e+e/Z1Gd)d*e1Z2Gd+d,e)Z3Gd-d.e3Z4Gd/d0e4Z5Gd1d2e4Z6Gd3d4e4Z7Gd5d6e4Z8id7e5d8e7d9e8d:e6d;e6de6d?e6d@e6dAe6dBe6dCe6dDe6dEe6dFe6dGe6e6e6dHZ9GdIdJe)Z:GdKdLe)Z;dS)Na Data object model, as per https://docs.python.org/3/reference/datamodel.html. This module describes, at least partially, a data object model for some of astroid's nodes. The model contains special attributes that nodes such as functions, classes, modules etc have, such as __doc__, __class__, __module__ etc, being used when doing attribute lookups over nodes. For instance, inferring `obj.__class__` will first trigger an inference of the `obj` variable. If it was successfully inferred, then an attribute `__class__ will be looked for in the inferred object. This is the part where the data model occurs. The model is attached to those nodes and the lookup mechanism will try to see if attributes such as `__class__` are defined by the model or not. If they are defined, the model will be requested to return the corresponding value of that attribute. Thus the model can be viewed as a special part of the lookup mechanism. ) annotationsN) lru_cache) TYPE_CHECKINGAny)basesnodesutil)InferenceContext copy_context)AttributeInferenceErrorInferenceError NoDefault)AstroidManager) node_classesobjectsbuilder))Literal)r)Propertyattr_c(tj|fdt|D}d|D}tt ||S)Nparentc<g|]}tj|S)valuerrConst).0robjs p/builddir/build/BUILD/cloudlinux-venv-1.0.7/venv/lib/python3.11/site-packages/astroid/interpreter/objectmodel.py z _dunder_dict..=s6   8= s333   cg|] }|d S))r elems r"r#z _dunder_dict..Ds 7 7 74d2h 7 7 7r$)rDictlistkeysvaluespostinitzip)instance attributesr+r,r!s @r" _dunder_dictr19s  8 , , ,C    AEjooFWFWAXAX   D8 7:#4#4#6#6 7 7 7FLLc$''(())) Jr$model ObjectModelreturnrcJ |jjS#t$r |jcYSwxYwN) _instance_proxiedAttributeError)r2s r"_get_bound_noder:Js;'' s ""ceZdZdZdZdZddZddZedd Z d Z e dd Z e ddZ dS)r3cd|_dSr6r7selfs r"__init__zObjectModel.__init__Ss r$cg}t|j}d}t|dz}t|D]}dt|z |z }t j|d|d}|dg}|ddD]} |d|z| z||||d d|zz |d zS) Nz%(cname)s(%(fields)s)P)indentwidthTr z, )cnamefields) type__name__lensortedr0pprintpformat splitlinesappendjoin) r?resultrHstring alignmentfieldrFlinesinnerlines r"__repr__zObjectModel.__repr__Vs T #(JJN DOO--.. ! !EUOi/EN5%@@@KKDQQE1XJEabb  5 5 S9_t34444 MM% sY.44V<<    r$c||_|Sr6r=)r?r/s r"__call__zObjectModel.__call__is! r$Nc||Sr6r')r?r/clss r"__get__zObjectModel.__get__mstH~~r$r4boolc.||vSr6)r0r?names r" __contains__zObjectModel.__contains__wst((((r$ list[str]c4dt|DS)z;Get the attributes which are exported by this object model.c`g|]+}|t|td,Sr6) startswith IMPL_PREFIXLEN_OF_IMPL_PREFIX)r os r"r#z*ObjectModel.attributes..}s5WWW1Q\\+=V=VW$%%&WWWr$)dirr>s r"r0zObjectModel.attributeszsXWD WWWWr$c||vrt|t|zSt|j|)zLook up the given *name* in the current model. It should return an AST or an interpreter object, but if the name is not found, then an AttributeInferenceError will be raised. target attribute)r0getattrrir r7rbs r"lookupzObjectModel.lookupsC 4??$$ $ $4t!344 4%T^tLLLLr$bases.BoundMethodctjd}tjd|_t j|t|S)zECalling cls.__new__(type) on an object returns an instance of 'type'.z$def __new__(self, cls): return cls()objectproxyboundr extract_noderbuiltins_modulerr BoundMethodr:r?nodes r" attr___new__zObjectModel.attr___new__sN#*"6 6# #  %&&6x@  t?43H3HIIIIr$ctjd}tjd|_t j|t|S)z-Calling cls.__init__() normally returns None.z0def __init__(self, *args, **kwargs): return Nonerurvryr}s r" attr___init__zObjectModel.attr___init__sN #*"6 B# #  %&&6x@  t?43H3HIIIIr$r6)r4r`)r4rer4rs)rK __module__ __qualname__r@rZr\r_rdrr0rrpropertyrrr'r$r"r3r3Rs   &))))Y[[XXX[XMMM J J JX J J J JX J J Jr$ceZdZdZedZedZedZedZedZ edZ edZ ed Z ed Z ed Zd S) ModuleModelc\tj}|jdS)N__dict__)rr{special_attributesrr)r?builtins_ast_modules r" _builtinszModuleModel._builtinss(,..>"5<s r" attr_builtinszModuleModel.attr_builtinss~~r$cjjstjdfdjjD}t jj}|||S)N__path__rncg|]Q}tj|ds|ntj|jRS)z __init__.pyr)rrendswithospathdirnamer7)r rr?s r"r#z-ModuleModel.attr___path__..sk     }}]33+ddW__T**~       r$r)r7packager rrListr-)r? path_objs containers` r" attr___path__zModuleModel.attr___path__s~% W):VVV V    +   !%T^<<< 9%%%r$cLtj|jj|jSNrrrr7rcr>s r" attr___name__zModuleModel.attr___name__!(;DNSSSSr$cjtjt|jjdd|jSNrrrrrqr7doc_noder>s r" attr___doc__zModuleModel.attr___doc__5!$.17DAA>    r$cLtj|jj|jSr)rrr7filer>s r" attr___file__zModuleModel.attr___file__rr$c@t|j|jjSr6)r1r7globalsr>s r" attr___dict__zModuleModel.attr___dict__sDNDN,BCCCr$cn|jjsd}n |jj}tj||jS)Nr)r7rrcrr)r?rs r"attr___package__zModuleModel.attr___package__s8~% (EEN'E!dnEEEEr$c(tjSr6rUnknownr>s r" attr___spec__zModuleModel.attr___spec__#%%%r$c(tjSr6rr>s r"attr___loader__zModuleModel.attr___loader__rr$c(tjSr6rr>s r"attr___cached__zModuleModel.attr___cached__rr$N)rKrrrrrrrrrrrrrrr'r$r"rrs@III  X X&TTXT  X TTXTDDXDFFXF&&X&&&X&&&X&&&r$rc:eZdZedZedZedZedZedZedZ e Z edZ edZ ed Z ed ZeZeZeZeZeZeZeZeZeZeZeZeZeZeZeZeZeZeZ eZ!d S) FunctionModelcLtj|jj|jSrrr>s r"rzFunctionModel.attr___name__rr$cjtjt|jjdd|jSrrr>s r"rzFunctionModel.attr___doc__rr$cftj|j|jSrrrr7qnamer>s r"attr___qualname__zFunctionModel.attr___qualname__s(!(<(<(>(>t~VVVVr$c|j}|jjstjd|Stj|}||jj|S)Nrr)r7argsdefaultsrrTupler-)r?func defaults_objs r"attr___defaults__zFunctionModel.attr___defaults__s^~y! ?%D>>> >#)666 di0111r$c,tj|j|jjsd}n |jj}|jj}t jt|jpg|jt|j |j t|j pg|j }d|D}|j r|j ||j<|jr|j||j<|r||d<fd|jD}|S)Nrc(i|]\}}||j|Sr'rc)r arg annotations r" z6FunctionModel.attr___annotations__..s5   %6c:j Hj   r$r4cFg|]\}}tj||fS)rr)r keyrr!s r"r#z6FunctionModel.attr___annotations__..&sB   e C 0 0 0% 8   r$)rr)r7returnsr itertoolschainr.r kwonlyargskwonlyargs_annotations posonlyargsposonlyargs_annotationsvarargannotationvarargkwargannotationkwargitemsr-)r?rrpair_annotationsrrr!s @r"attr___annotations__z"FunctionModel.attr___annotations__ sDt~666~% -GGn,G~"$?  R!1 2 2 !< = =  &B(D E E     :J      ='+'s r"rzFunctionModel.attr___dict__. 7777r$cd}|jj}tj|j}t |||}|t ||S)Nc3K|jD]O} ||j}n#t$rY*wxYwt j|j|}||fVPdSr)r default_valuercrrr)rrrdefaultrcs r" _default_argsz8FunctionModel.attr___kwdefaults__.._default_args6s $ $"00::GG H$)#(6BBBGm#### $ $s ( 55r)r7rrr)dictr-r*r)r?rrr!rs r"attr___kwdefaults__z!FunctionModel.attr___kwdefaults__4st $ $ $~"t~666 dC0011 T(..**++,,, r$c|tj|jSr6rrr7rootrr>s r"attr___module__zFunctionModel.attr___module__G-!$."5"5"7"7"="="?"?@@@r$ct|jGfddtj}||j|jS)NcFeZdZdZd dZ d d fd Zefd ZdS) 9FunctionModel.attr___get__..DescriptorBoundMethodz_Bound method which knows how to understand calling descriptor binding. r4 Literal[0]cdSNrr'r>s r"implicit_parameterszMFunctionModel.attr___get__..DescriptorBoundMethod.implicit_parametersTs qr$NcontextInferenceContext | Nonec3Kt|jdkst|jdkrtd||t|} t |jd|}n/#t $r"}t||jd|d}~wwxYwt|tj rtd||ttj rVdS j jjj }|jjjjj tj|}tj || VdS) NrDrBz(Invalid arguments for descriptor bindingrorrr)rr~zInvalid class inferred)rclineno col_offsetr)rrv)rLrr r nextinfer StopIteration isinstancer UninferableBaserr| __class__rcrrrr-body decoratorsrr UnboundMethod)r?callerrr^enew_funcrwrs r"infer_call_resultzKFunctionModel.attr___get__..DescriptorBoundMethod.infer_call_resultYsv{##a''3v{+;+;a+?+?(B# ' 'w//Vv{1~33G3DDEECC$VVV(v{1~NNNTUUVc4#788(0w dE$566JJJF >>;#; *!!IIOL!] "+H55'e3????????s.B B1B,,B1cDjj}|tjdjj}tjjj}|||gggg|S)aOverwrite the underlying args to match those of the underlying func. Usually the underlying *func* is a function/method, as in: def test(self): pass This has only the *self* parameter but when we access test.__get__ we get a new object which has two parameters, *self* and *type*. rJrr)rrrr kw_defaultsr) rcopyrQastroid AssignNamer Argumentsrr-)r?positional_or_keyword_paramspositional_only_params argumentsrs r"rz>FunctionModel.attr___get__..DescriptorBoundMethod.argss04y~/B/B/D/D,,33G4FF4S4S4STTT)-)>)C)C)E)E&#-TY5EFFF ""5 6! " " #! r$)r4rr6rr)rKrr__doc__rrrrrsr"DescriptorBoundMethodrOs       BF. @. @. @. @. @. @. @` ! ! ! !X ! ! !r$rrv)r7rr|)r?rrs @r" attr___get__zFunctionModel.attr___get__Ksh~U !U !U !U !U !U !U !E$5U !U !U !n%$4>PPPPr$c(tjSr6rr>s r" attr___ne__zFunctionModel.attr___ne__s#%%%r$N)"rKrrrrrrrrrattr___globals__rrrrattr___subclasshook__ attr___str__attr___sizeof__attr___setattr___ attr___repr__attr___reduce__attr___reduce_ex__ attr___lt__ attr___eq__ attr___gt__attr___format__attr___delattr___attr___getattribute__ attr___hash__ attr___dir__ attr___call__attr___class__attr___closure__ attr___code__r'r$r"rrs TTXT  X WWXWXXB88X8% X$AAXAZQZQXZQz&&X&(L!O#M!O$KKK!O#'MLM N"MMMr$rceZdZfdZedZedZedZedZedZ edZ edZ ed Z ed Z ed Zed ZxZS) ClassModelcnt|_tdSr6)r rsuperr@)r?rs r"r@zClassModel.__init__s,'))  r$c|tj|jSr6rr>s r"rzClassModel.attr___module__rr$c>tj|jjSr6rr>s r"rzClassModel.attr___name__s!$."5666r$cXtj|jSr6rr>s r"rzClassModel.attr___qualname__s!!$."6"6"8"8999r$c\tjt|jjddSNrrr>s r"rzClassModel.attr___doc__$!'$.*A7D"Q"QRRRr$c|jjst|jd|j}t j|j}|||S)N__mro__rnr)r7newstyler mrorrr-)r?r9r!s r" attr___mro__zClassModel.attr___mro__sd~& V)9UUU Un  "" 777 S r$c|jjst|jd|Gfddtj}|j}|jdd}|||S)Nr9rnc eZdZ ddfd ZdS)+ClassModel.attr_mro..MroBoundMethodNrrc3KjVdSr6)r:)r?rr other_selfs r"rz=ClassModel.attr_mro..MroBoundMethod.infer_call_results!------r$r6rrKrrr)r?sr"MroBoundMethodr=s;AE . . . . . . . . .r$rArrv)r7r8r rr|implicit_metaclasslocals)r?rArB mro_methodr?s @r"attr_mrozClassModel.attr_mros~& R)5QQQ Q  . . . . . . .U. . . . "^>>@@'.u5a8 ~J6HIIIIr$ctj}t}t|j|}|||S)Nelts)rrr r*r7_inferred_basesr-)r?r!rrHs r"attr___bases__zClassModel.attr___bases__sQ """$$DN227;;<< $  r$cBddlm}||jSNr)helpersr rM object_typer7r?rMs r"r)zClassModel.attr___class__, $#####""4>222r$c jjstjdjj}fd|t jD}tj j |Gfddtj }j }|jdd}|||S) zGet the subclasses of the underlying class. This looks only in the current module for retrieving the subclasses, thus it might miss a couple of them. __subclasses__rncbg|]+}|jk |j)|,S)r)r7 is_subtype_ofr)r r^rr?s r"r#z2ClassModel.attr___subclasses__..sJ   dn$$):):5$,):)W)W$ $$$r$rc eZdZ ddfd ZdS)=ClassModel.attr___subclasses__..SubclassesBoundMethodNrrc3KVdSr6r'r?rrr!s r"rzOClassModel.attr___subclasses__..SubclassesBoundMethod.infer_call_result r$r6rr@r!sr"SubclassesBoundMethodrW;AE         r$r\rrv)r7r8r rrnodes_of_classrClassDefrrr-rr|rBrC)r?rclassesr\rBsubclasses_methodr!rs` @@r"attr___subclasses__zClassModel.attr___subclasses__s:~& )~1A $$&&~""$$     **5>::    t~666 W       E$5    "^>>@@.56FGJ$$+s r"rzClassModel.attr___dict__&rr$c4|jS)z-Calling a class A() returns an instance of A.)r7instantiate_classr>s r"r(zClassModel.attr___call__*s~//111r$)rKrrr@rrrrrr:rErJr)rbrr( __classcell__rs@r"r-r-sn AAXA77X7::X:SSXSXJJXJ$X33X3 XXXX@88X822X22222r$r-cfeZdZedZedZedZedZdS) SuperModelc|jjSr6)r7 mro_pointerr>s r"attr___thisclass__zSuperModel.attr___thisclass__1 ~))r$c|jjSr6)r7 _self_classr>s r"attr___self_class__zSuperModel.attr___self_class__5rmr$c|jjSr6)r7rJr>s r" attr___self__zSuperModel.attr___self__9s ~""r$c|jjSr6r7r8r>s r"r)zSuperModel.attr___class__= ~&&r$N)rKrrrrlrprrr)r'r$r"riri0s~ **X***X*##X#''X'''r$ric\eZdZedZedZedZeZeZeZ dS)UnboundMethodModelcBddlm}||jSrLrNrPs r"r)z!UnboundMethodModel.attr___class__CrQr$c|jjSr6rtr>s r" attr___func__z UnboundMethodModel.attr___func__Jrur$c8tjd|jSr)rrr7r>s r"rrz UnboundMethodModel.attr___self__Ns!T^DDDDr$N) rKrrrr)rzrr attr_im_func attr_im_class attr_im_selfr'r$r"rwrwBsq 33X3 ''X'EEXE!L"M LLLr$rwcBeZdZdZeddZeddZdS)ContextManagerModelzModel for context managers. Based on 3.3.9 of the Data Model documentation: https://docs.python.org/3/reference/datamodel.html#with-statement-context-managers r4rsctjd}tjd|_t j|t|S)a.Representation of the base implementation of __enter__. As per Python documentation: Enter the runtime context related to this object. The with statement will bind this method's return value to the target(s) specified in the as clause of the statement, if any. zdef __enter__(self): ...rurvryr}s r"attr___enter__z"ContextManagerModel.attr___enter__^sJ#*"67U"V"V%&&6x@  t?43H3HIIIIr$ctjd}tjd|_t j|t|S)aLRepresentation of the base implementation of __exit__. As per Python documentation: Exit the runtime context related to this object. The parameters describe the exception that caused the context to be exited. If the context was exited without an exception, all three arguments will be None. z7def __exit__(self, exc_type, exc_value, traceback): ...rurvryr}s r" attr___exit__z!ContextManagerModel.attr___exit__nsN#*"6 I# #  %&&6x@  t?43H3HIIIIr$Nr)rKrrrrrrr'r$r"rrWsh  J J JX JJJJXJJJr$rc:eZdZedZedZdS)BoundMethodModelc$|jjjSr6rtr>s r"rzzBoundMethodModel.attr___func__s~&//r$c|jjSr6)r7rxr>s r"rrzBoundMethodModel.attr___self__s ~##r$N)rKrrrrzrrr'r$r"rrsH 00X0$$X$$$r$rcJeZdZfdZedZedZxZS)GeneratorModelc2tj|g|Ri|}tjd}|jD]E\}}|d}|fd}t t|t|zt|F|S)N generatorrc|Sr6r'r^meths r"patchedz'GeneratorModel.__new__..patched r$) r/__new__rr{rCrsetattrrJrir) r^rkwargsretrrcr,methodrrs r"rzGeneratorModel.__new__seggoc3D333F33"$$4[A %,2244 F FLD&AYF"(     DII{T18G3D3D E E E E r$cVtj|jjj|jSr)rrr7rrcr>s r"rzGeneratorModel.attr___name__s+!.',T^    r$cttjt|jjjdd|jSr)rrrqr7rrr>s r"rzGeneratorModel.attr___doc__s8!$./8'4HH>    r$)rKrrrrrrrfrgs@r"rrsn       X   X     r$rceZdZfdZxZS)AsyncGeneratorModelc~tj|g|Ri|}tj}|d}||d}|jD]E\}}|d}|fd} tt|t|zt| F|S)Nasync_generatorrrc|Sr6r'rs r"rz,AsyncGeneratorModel.__new__..patchedrr$) r/rrr{getrCrrrJrir) r^rrrastroid_builtinsrrcr,rrrs r"rzAsyncGeneratorModel.__new__seggoc3D333F33)++;$(():;;  (,,[99I%,2244 F FLD&AYF"(     DII{T18G3D3D E E E E r$)rKrrrrfrgs@r"rrs8r$rcfeZdZedZedZedZedZdS) InstanceModelc|jjSr6rtr>s r"r)zInstanceModel.attr___class__rur$c|tj|jSr6rr>s r"rzInstanceModel.attr___module__rr$c\tjt|jjddSr4rr>s r"rzInstanceModel.attr___doc__r5r$c@t|j|jjSr6)r1r7instance_attrsr>s r"rzInstanceModel.attr___dict__sDNDN,IJJJr$N)rKrrrr)rrrr'r$r"rrs ''X'AAXASSXSKKXKKKr$rc<eZdZeddZedZdS)ExceptionInstanceModelr4 nodes.Tuplec6tj|jSr)rrr7r>s r" attr_argsz ExceptionInstanceModel.attr_argss{$.1111r$c~tj}|tjj}|Sr6)rr{types TracebackTyperKre)r?rtraceback_types r"attr___traceback__z)ExceptionInstanceModel.attr___traceback__s3,..>,U-@-IJ//111r$N)r4r)rKrrrrrr'r$r"rrsM 222X222X222r$rc$eZdZedZdS)SyntaxErrorInstanceModelc*tjdSNrrr>s r" attr_textz"SyntaxErrorInstanceModel.attr_text!"%%%r$N)rKrrrrr'r$r"rr- &&X&&&r$rcTeZdZedZedZedZeZdS)OSErrorInstanceModelc*tjdSrrr>s r" attr_filenamez"OSErrorInstanceModel.attr_filenamerr$c*tjdSrrr>s r" attr_errnozOSErrorInstanceModel.attr_errnos!!$$$r$c*tjdSrrr>s r" attr_strerrorz"OSErrorInstanceModel.attr_strerrorrr$N)rKrrrrrrattr_filename2r'r$r"rrsd &&X&%%X%&&X&#NNNr$rc:eZdZedZedZdS)ImportErrorInstanceModelc*tjdSrrr>s r" attr_namez"ImportErrorInstanceModel.attr_namerr$c*tjdSrrr>s r" attr_pathz"ImportErrorInstanceModel.attr_pathrr$N)rKrrrrrr'r$r"rrsH &&X&&&X&&&r$rc$eZdZedZdS)UnicodeDecodeErrorInstanceModelc*tjdSrrr>s r" attr_objectz+UnicodeDecodeErrorInstanceModel.attr_objectrr$N)rKrrrrr'r$r"rrrr$rzbuiltins.SyntaxErrorzbuiltins.ImportErrorzbuiltins.UnicodeDecodeErrorzbuiltins.OSErrorzbuiltins.BlockingIOErrorzbuiltins.BrokenPipeErrorzbuiltins.ChildProcessErrorzbuiltins.ConnectionAbortedErrorzbuiltins.ConnectionErrorzbuiltins.ConnectionRefusedErrorzbuiltins.ConnectionResetErrorzbuiltins.FileExistsErrorzbuiltins.FileNotFoundErrorzbuiltins.InterruptedErrorzbuiltins.IsADirectoryErrorzbuiltins.NotADirectoryErrorzbuiltins.PermissionError)zbuiltins.ProcessLookupErrorzbuiltins.TimeoutErrorcleZdZedZdZedZedZedZdS) DictModelc|jjSr6rtr>s r"r)zDictModel.attr___class__rur$cGfddtj}t|jj|d}|||jS)z7Generate a bound method that can infer the given *obj*.c eZdZ ddfd ZdS)@DictModel._generic_dict_attribute..DictMethodBoundMethodNrrc3KVdSr6r'rYs r"rzRDictModel._generic_dict_attribute..DictMethodBoundMethod.infer_call_result%rZr$r6rr@r[sr"DictMethodBoundMethodr$r]r$rNrv)r r|rr7r8igetattr)r?r!rcrrs ` r"_generic_dict_attributez!DictModel._generic_dict_attribute!sv       G$7    DN+44T::DAA$$4t~FFFFr$clg}tj|j}|jjD]F\}}tj|}|||f||G||t|}| |dS)NrrGr) rrr7rrr-rQr DictItemsr)r?elemsr!rrr(s r" attr_itemszDictModel.attr_items-st~666..  JC%S111D MM3, ' ' ' LL     %    $$++C999r$cd|jjD}tj|j}||t |}||dS)Ncg|]\}}|Sr'r')r r_s r"r#z'DictModel.attr_keys..<s999a999r$rrGr+)r7rrrr-rDictKeysr)r?r+r!s r" attr_keyszDictModel.attr_keys:sl99DN$8999t~666 $ s##++C888r$cd|jjD}tj|j}||t |}||dS)Ncg|]\}}|Sr'r')r rrs r"r#z)DictModel.attr_values..Es???JQ%???r$rr,)r7rrrr-r DictValuesr)r?r,r!s r" attr_valueszDictModel.attr_valuesCsj??$.*>???t~666 V  %%++C:::r$N) rKrrrr)rrrrr'r$r"rrs ''X' G G G : :X :99X9;;X;;;r$rceZdZdZdZedZedZedZedZ edZ dS) PropertyModelzModel for a builtin property.c tj||j}tj|}|gggggggg||g|S)Nrcrr)rrrr rrrrrr)r FunctionDefr7r r-)r?rcfunctionrs r"_init_functionzPropertyModel._init_functionPs~$$t~FFFh/// $&#%   t"---r$c|jGfddtj}|d|j}|jj|S)Nc eZdZ ddfd ZdS)5PropertyModel.attr_fget..PropertyFuncAccessorNrrc3K|r*t|jdkrtd||j||Ed{VdS)NrBzfget() needs a single argumentrrr)rLrr rr)r?rrrs r"rzGPropertyModel.attr_fget..PropertyFuncAccessor.infer_call_resultgsc&+..!33(8w =::!7;r$NNrr@rsr"PropertyFuncAccessorrfs;FJ         r$rfgetrr)r7rrr-rr)r?rproperty_accessorrs @r" attr_fgetzPropertyModel.attr_fgetbs~~       5#4   10fT^TTT""  "BBB  r$c |j}d d}||std|jjGfddtj}|d |j }|jj |S) Nrrr4astroid.FunctionDef | NonecfdjDD]A}|D]*}|jjdzr|ccS+BdS)z Given a property, find the corresponding setter function and returns it. :param func: property for which the setter has to be found :return: the setter function or None c>g|]}|jjjk|Sr')rcr)r trs r"r#z@PropertyModel.attr_fset..find_setter..s14=CU9U9U9U9U9Ur$z.setterN)r get_childrendecoratornamesrrrc)rrodec_names` r" find_setterz,PropertyModel.attr_fset..find_setter|s;3355 & &!' 5 5 7 7&&H(();i)GHH&% &&4r$z&Unable to find the setter of property c eZdZ ddfd ZdS)5PropertyModel.attr_fset..PropertyFuncAccessorNrrc3K|r*t|jdkrtd||||Ed{VdS)NrDzfset() needs two argumentsrr)rLrr r)r?rr func_setters r"rzGPropertyModel.attr_fset..PropertyFuncAccessor.infer_call_resultswc&+..!33(4T7'88PW8XXXXXXXXXXXr$rrr@)rsr"rrsDFJ Y Y Y Y Y Y Y Y Yr$rfsetrr)rrr4r) r7r rrcrrr-rr)r?rrrrrs @r" attr_fsetzPropertyModel.attr_fsetxs~    "k$''   M9KMM  Y Y Y Y Y Y Y5#4 Y Y Y10fT^TTT"" (8{?O"PPP  r$c,|dS)Nsetterrr>s r" attr_setterzPropertyModel.attr_setter""8,,,r$c,|dS)Ndeleterrr>s r" attr_deleterzPropertyModel.attr_deleters""9---r$c,|dS)Ngetterrr>s r" attr_getterzPropertyModel.attr_getterrr$N) rKrrrrrrrrr r r'r$r"rrMs''$!!X!*%!%!X%!N--X-..X.--X---r$r)r2r3r4r)rs &#""""" %%%%%%%%&&&&&&&&&&::::::::QQQQQQQQQQ******&&&&&& $ 9 % % $ 9 % %v)))))))(((((( S%%"PJPJPJPJPJPJPJPJfJ&J&J&J&J&+J&J&J&ZM M M M M KM M M `k2k2k2k2k2k2k2k2\''''''''$!!!!!!!!*'J'J'J'J'J+'J'J'JT$$$$$}$$$     ]$7   :.*KKKKKKKKK* 2 2 2 2 2] 2 2 2&&&&&5&&& # # # # #1 # # # &&&&&5&&&&&&&&&<&&& 44"#B ,   4  4!"6&'; 4&';$%9 4!"6 !5 !"6!""#7#$ 4%&$81)0.;.;.;.;.; .;.;.;b]-]-]-]-]-K]-]-]-]-]-r$