ParameterDefinition
A class to define a migration parameter.
Source code in pum/parameter.py
__eq__
Check if two ParameterDefinition instances are equal.
Source code in pum/parameter.py
__init__
__init__(name: str, type: str | ParameterType, default: str | float | int | None = None, description: str | None = None) -> None
Initialize a ParameterDefintion instance.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name
|
str
|
The name of the parameter. |
required |
type
|
str | ParameterType
|
The type of the parameter, as a string or ParameterType. |
required |
default
|
str | float | int | None
|
The default value for the parameter. Defaults to None. |
None
|
description
|
str | None
|
A description of the parameter. Defaults to None. |
None
|
Raises:
Type | Description |
---|---|
ValueError
|
If type is a string and not a valid ParameterType. |
TypeError
|
If type is not a string or ParameterType. |