There is a potential problem with the type checking introduced in #824. The implementation checks the input types only the first time the function is called to avoid overhead.
In production mode, there should be no issue as we only want to do this at the city level to warn the user of wrong input values. However, when we run the test suite, we probably want to check those values every time as the various tests may call the same function with different inputs.
- Is there really a significant overhead in checking the inputs at every call?
- Should we have different global modes and check annotations differently in each case? I don't like it.
- Maybe do nothing and assume that
check_annotations is only meant to be used in production mode?
There is a potential problem with the type checking introduced in #824. The implementation checks the input types only the first time the function is called to avoid overhead.
In production mode, there should be no issue as we only want to do this at the city level to warn the user of wrong input values. However, when we run the test suite, we probably want to check those values every time as the various tests may call the same function with different inputs.
check_annotationsis only meant to be used in production mode?