Skip to content

Commit e6fc706

Browse files
committed
Update cli.py
Fix handling of cli 'none' entry
1 parent e0205ec commit e6fc706

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/wristpy/core/cli.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ def main(
7373
"Leave as None when processing single files.",
7474
),
7575
calibrator: Calibrator = typer.Option(
76-
None,
76+
Calibrator.none,
7777
"-c",
7878
"--calibrator",
7979
help="Pick which calibrator to use."
@@ -143,12 +143,13 @@ def main(
143143
logger.setLevel(log_level)
144144

145145
nonwear_algorithms = [algo.value for algo in nonwear_algorithm]
146+
calibrator_value = None if calibrator == Calibrator.none else calibrator.value
146147

147148
logger.debug("Running wristpy. arguments given: %s", locals())
148149
orchestrator.run(
149150
input=input,
150151
output=output,
151-
calibrator=calibrator.value if calibrator else None, # type: ignore[arg-type] # Covered by Calibrator Enum class
152+
calibrator=calibrator_value,
152153
activity_metric=activity_metric.value,
153154
thresholds=None if thresholds is None else thresholds,
154155
epoch_length=epoch_length,

0 commit comments

Comments
 (0)