From 94e753cb8dbfa947b9ecafbae9a703188dc97085 Mon Sep 17 00:00:00 2001 From: Pascal Kaiser Date: Mon, 11 Apr 2022 10:23:11 +0200 Subject: [PATCH] Add additional type hints --- cara/apps/calculator/model_generator.py | 2 +- cara/apps/calculator/report_generator.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cara/apps/calculator/model_generator.py b/cara/apps/calculator/model_generator.py index 595094bc..eab4d069 100644 --- a/cara/apps/calculator/model_generator.py +++ b/cara/apps/calculator/model_generator.py @@ -642,7 +642,7 @@ def build_expiration(expiration_definition) -> models._ExpirationBase: return expiration_distribution(tuple(BLO_factors)) -def baseline_raw_form_data(): +def baseline_raw_form_data() -> typing.Dict[str, typing.Union[str, float]]: # Note: This isn't a special "baseline". It can be updated as required. return { 'activity_type': 'office', diff --git a/cara/apps/calculator/report_generator.py b/cara/apps/calculator/report_generator.py index 258ed6bf..390c81a3 100644 --- a/cara/apps/calculator/report_generator.py +++ b/cara/apps/calculator/report_generator.py @@ -96,7 +96,7 @@ def interesting_times(model: models.ExposureModel, approx_n_pts=100) -> typing.L return nice_times -def calculate_report_data(model: models.ExposureModel): +def calculate_report_data(model: models.ExposureModel) -> typing.Dict[str, typing.Any]: times = interesting_times(model) concentrations = [