Skip to content

Introduce NewTypes for Trial- and TestSpace

Daniel Bauer requested to merge bauerd/trial-test-newtypes into main

Closes #14 (closed).

Introduces NewTypes for Trial- and TestSpace such that mypy can check they are not confused.

  • Had to change FunctionSpace from Protocol to ABC.
  • Comparisons between test and trial spaces now trigger mypy warnings because we are comparing objects of different types. These warnings must be ignored which is a bit nasty but I think worth overall.
  • Fixed typing of tests.
  • This exercise revealed a few mix-ups of trial/test in the tests (mypy told me).
Edited by Daniel Bauer

Merge request reports