Skip to content

What to do about type checking #900

@gonzaponte

Description

@gonzaponte

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions