Argument

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

Method or function argument.

Argument

[find in source code]

class Argument():
    def __init__(
        name: str,
        type_annotation: FakeAnnotation | None,
        default: TypeConstant | None = None,
        prefix: str = '',
    ):

Method or function argument.

Arguments

  • name - Argument name.
  • type_annotation - Argument type annotation.
  • value - Default argument value.
  • prefix - Used for starargs.

Argument().is_kwflag

[find in source code]

def is_kwflag() -> bool:

Whether argument is a * keywords separator.

Argument().iterate_types

[find in source code]

def iterate_types() -> Iterator[FakeAnnotation]:

Extract required type annotations.

See also

Argument.kwflag

[find in source code]

@classmethod
def kwflag() -> _R:

Create * keywords separator.

Argument().render

[find in source code]

def render() -> str:

Render argument to a string.

Argument().required

[find in source code]

@property
def required() -> bool:

Whether argument does not have a default value and is required.