MigrationParameterDefinition
A class to define a migration parameter.
Source code in pum/migration_parameter.py
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 |
|
__init__
__init__(name: str, type_: str | MigrationParameterType, default: str | int | float = None, description: str = None)
Initialize a MigrationParameterDefintion instance.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name
|
str
|
The name of the parameter. |
required |
type_
|
str | MigrationParameterType
|
The type of the parameter, as a string or MigrationParameterType. |
required |
default
|
str | int | float
|
The default value for the parameter. Defaults to None. |
None
|
description
|
str
|
A description of the parameter. Defaults to None. |
None
|
Raises:
Type | Description |
---|---|
ValueError
|
If type_ is a string and not a valid MigrationParameterType. |
TypeError
|
If type_ is not a string or ParameterType. |
Source code in pum/migration_parameter.py
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 |
|