minos.common.model.types.builders

Functions

build_union(options)

Build the union type base on the given options.

Classes

TypeHintBuilder

Type Hint Builder class.

TypeHintParser

Type Hint Parser class.

build_union(options)[source]

Build the union type base on the given options.

Parameters

options (Iterable[type, ...]) – A tuple of types.

Returns

The union of types.

Return type

type

class TypeHintBuilder[source]

Bases: object

Type Hint Builder class.

__init__(value, type_=None)[source]
Parameters
build()[source]

Build type hint from an instance..

Returns

A type.

Return type

type

class TypeHintParser[source]

Bases: object

Type Hint Parser class.

__init__(type_=None)[source]
Parameters

type_ (Optional[type]) –

build()[source]

Parse type hint.

Returns

A type.

Return type

type