Skip to content

Commit c19a404

Browse files
authored
fix: parameter typing for File (#371)
1 parent d48ae23 commit c19a404

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

openhexa/sdk/pipelines/parameter.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -445,6 +445,7 @@ def __init__(
445445
| S3Connection
446446
| CustomConnection
447447
| Dataset
448+
| File
448449
],
449450
name: str | None = None,
450451
choices: typing.Sequence | None = None,
@@ -628,6 +629,7 @@ def parameter(
628629
| S3Connection
629630
| CustomConnection
630631
| Dataset
632+
| File
631633
],
632634
name: str | None = None,
633635
choices: typing.Sequence | None = None,
@@ -647,7 +649,7 @@ def parameter(
647649
----------
648650
code : str
649651
The parameter identifier (must be unique for a given pipeline)
650-
type : {str, int, bool, float, DHIS2Connection, IASOConnection, PostgreSQLConnection, GCSConnection, S3Connection}
652+
type : {str, int, bool, float, DHIS2Connection, IASOConnection, PostgreSQLConnection, GCSConnection, S3Connection, CustomConnection, Dataset, File}
651653
The parameter Python type
652654
name : str, optional
653655
A name for the parameter (will be used instead of the code in the web interface)
@@ -668,7 +670,7 @@ def parameter(
668670
Whether this parameter should be provided multiple values (if True, the value must be provided as a list of
669671
values of the chosen type)
670672
directory : str, optional
671-
An optional parameter to force file selection to specific directory (only used for parater type File). If the directory does not exist, it will be ignored.
673+
An optional parameter to force file selection to specific directory (only used for parameter type File). If the directory does not exist, it will be ignored.
672674
673675
Returns
674676
-------

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ requires-python = ">=3.11,<3.15" # the main constraint for supported Python vers
2020
dependencies = [
2121
"urllib3<3",
2222
"multiprocess~=0.70.15",
23-
"requests>=2.31,<2.33",
23+
"requests>=2.31,<2.34",
2424
"PyYAML~=6.0",
2525
"click~=8.1.3",
2626
"jinja2>3,<4",

0 commit comments

Comments
 (0)