Skip to content

Commit b271c87

Browse files
committed
fix: filter valid types
1 parent d2c0f6a commit b271c87

1 file changed

Lines changed: 26 additions & 2 deletions

File tree

openhexa/sdk/pipelines/parameter.py

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,19 @@ def __init__(
387387
self,
388388
code: str,
389389
*,
390-
type: type,
390+
type: type[
391+
str
392+
| int
393+
| bool
394+
| float
395+
| DHIS2Connection
396+
| IASOConnection
397+
| PostgreSQLConnection
398+
| GCSConnection
399+
| S3Connection
400+
| CustomConnection
401+
| Dataset
402+
],
391403
name: str | None = None,
392404
choices: typing.Sequence | None = None,
393405
help: str | None = None,
@@ -553,7 +565,19 @@ def validate_parameters(parameters: list[Parameter]):
553565
def parameter(
554566
code: str,
555567
*,
556-
type: type,
568+
type: type[
569+
str
570+
| int
571+
| bool
572+
| float
573+
| DHIS2Connection
574+
| IASOConnection
575+
| PostgreSQLConnection
576+
| GCSConnection
577+
| S3Connection
578+
| CustomConnection
579+
| Dataset
580+
],
557581
name: str | None = None,
558582
choices: typing.Sequence | None = None,
559583
help: str | None = None,

0 commit comments

Comments
 (0)