beamlime.constructors.inspectors#

Functions

collect_arg_typehints(callable_obj)

rtype:

dict[str, type[Any]]

collect_argument_specs(callable_obj, ...)

Collect Dependencies from the signature and type hints.

collect_attr_specs(callable_class)

Collect Dependencies from the type hints of the class.

extract_underlying_type(product_type)

rtype:

type[TypeVar(Product)]

get_product_spec(callable_obj)

Retrieve the product of provider.

validate_annotation(annotation)

Check if the origin of the annotation is not Union.

Classes

DependencySpec(dependency_type, default_value)

Specification of sub-dependencies (arguments/attributes) of a provider.

Empty()

ProductSpec(product_type)

Specification of a product (returned value) of a provider.

UnknownType()

Exceptions

InsufficientAnnotationError

ProductNotFoundError