class documentation

class Attribute: (source)

View In Hierarchy

The value of an attr.ib() call.
Class Method deserialize Return the Attribute that was serialized.
Method __init__ Undocumented
Method argument Return this attribute as an argument to __init__.
Method expand​_typevar​_from​_subtype Expands type vars in the context of a subtype when an attribute is inherited from a generic super type.
Method serialize Serialize this object so it can be saved and restored.
Instance Variable context Undocumented
Instance Variable converter Undocumented
Instance Variable has​_default Undocumented
Instance Variable info Undocumented
Instance Variable init Undocumented
Instance Variable init​_type Undocumented
Instance Variable kw​_only Undocumented
Instance Variable name Undocumented
@classmethod
def deserialize(cls, info, data, api): (source)
Return the Attribute that was serialized.
Parameters
info:TypeInfoUndocumented
data:JsonDictUndocumented
api:SemanticAnalyzerPluginInterfaceUndocumented
Returns
AttributeUndocumented
def __init__(self, name, info, has_default, init, kw_only, converter, context, init_type): (source)

Undocumented

Parameters
name:strUndocumented
info:TypeInfoUndocumented
has​_default:boolUndocumented
init:boolUndocumented
kw​_only:boolUndocumented
converter:ConverterUndocumented
context:ContextUndocumented
init​_type:Optional[Type]Undocumented
def argument(self, ctx): (source)
Return this attribute as an argument to __init__.
Parameters
ctx:mypy.plugin.ClassDefContextUndocumented
Returns
ArgumentUndocumented
def expand_typevar_from_subtype(self, sub_type): (source)
Expands type vars in the context of a subtype when an attribute is inherited from a generic super type.
Parameters
sub​_type:TypeInfoUndocumented
def serialize(self): (source)
Serialize this object so it can be saved and restored.
Returns
JsonDictUndocumented
context = (source)

Undocumented

converter = (source)

Undocumented

has_default = (source)

Undocumented

info = (source)

Undocumented

init = (source)

Undocumented

init_type = (source)

Undocumented

kw_only = (source)

Undocumented

name = (source)

Undocumented