Skip to content

Fix the type annotations for the cara codebase

Philip Elson requested to merge pelson/cara:feature/type-checking into master

This MR is exclusively designed to address the type annotations of the CARA codebase.

In order to do so, a few issues had to be addressed. They were:

  • cara.apps.calculator.report_generator.readable_minutes had a bug that would raise an exception if minutes were not MOD 60 (not sure how we didn't see this before, but there is now a test for it)
  • The Ventilation class and its related MultipleVentilation now share a base-class, and it is this type which is expected in the ConcentrationModel

This all checks-out with mypy cara, and additionally with the pytest-mypy plugin (so it is run in CI before we deploy).

Merge request reports