Type mapping
provide.foundation.hub.type_mapping
¶
Type system and Click type mapping utilities.
Functions¶
extract_click_type
¶
Extract a Click-compatible type from a Python type annotation.
This is a wrapper around extract_concrete_type() that ensures compatibility with Click's type system.
Handles: - Union types (str | None, Union[str, None]) - Optional types (str | None) - Regular types (str, int, bool) - String annotations (from future import annotations)
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
annotation
|
Any
|
Type annotation from function signature |
required |
Returns:
| Type | Description |
|---|---|
type
|
A type that Click can understand |