Attribute

mypy-boto3-builder Index / Mypy Boto3 Builder / Structures / Attribute

Auto-generated documentation for mypy_boto3_builder.structures.attribute module.

Attribute

Show source in attribute.py:10

Class or module attribute.

Attributes

  • name - Attribute name.
  • type - Attribute type annotation.
  • value - Attribute value.
  • type_ignore - Add type: ignore comment.

Signature

class Attribute:
    def __init__(
        self,
        name: str,
        type_annotation: FakeAnnotation,
        value: TypeConstant | None = None,
        type_ignore: bool = False,
    ):
        ...

See also

Attribute().iterate_types

Show source in attribute.py:33

Iterate over all type annotations used.

Yields

Type annotation.

Signature

def iterate_types(self) -> Iterator[FakeAnnotation]:
    ...

See also

Attribute().render

Show source in attribute.py:42

Render to a string.

Signature

def render(self) -> str:
    ...