Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

What to do about type checking #900

Open
gonzaponte opened this issue Oct 20, 2024 · 0 comments
Open

What to do about type checking #900

gonzaponte opened this issue Oct 20, 2024 · 0 comments

Comments

@gonzaponte
Copy link
Collaborator

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?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant