Gݦį d Z ddlmZ ddlZddlZddlZddlZddlZddlm Z ddl
mZmZ ddl
Z
ddl
mZmZmZ ddlmZmZ ddlmZmZmZ dd lmZ dd
lmZ ej d Z ej d Zej d
k rddl
m Z nddl!m Z erddl
mZ ddl"m#Z# dZ$ e%e$ Z&d Z'dMdZ( G d d Z) G d de) Z* G d de) Z+ G d de) Z, G d d e) Z- G d! d"e) Z. G d# d$e) Z/ G d% d&e+ Z0 G d' d(e+e/ Z1 G d) d*e1 Z2 G d+ d,e) Z3 G d- d.e3 Z4 G d/ d0e4 Z5 G d1 d2e4 Z6 G d3 d4e4 Z7 G d5 d6e4 Z8i d7e5d8e7d9e8d:e6d;e6de6d?e6d@e6dAe6dBe6dCe6dDe6dEe6dFe6dGe6e6e6dHZ9 G dI dJe) Z: G dK dLe) 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)InferenceContextcopy_context)AttributeInferenceErrorInferenceError NoDefault)AstroidManager)node_classesobjectsbuilder) )Literal)r )Propertyattr_c ( t j | fdt | D }d | D } t t
|| S )Nparentc <