-
-
Notifications
You must be signed in to change notification settings - Fork 407
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
Fix type hints #1581
Comments
I read the discussion. |
The problem is not in the examples but in how the type hints are set. A tuple is a perfectly valid way to pass variable names, so would a numpy array be for example. However, the type hint says the input must be a list, instead of having a type hint saying anything of type |
Okay. |
You can still take the issue, I am not very familiar with type hints either. As we were saying on the issue, one of the goals of working on these issues (instead of just ignoring them because they don't affect the actual library) is precisely for all of us to get a bit more familiar with type hints. |
Hello @OriolAbril, are there more changes to be done to this issue? |
As per my comment on #1587: #1586 (comment)
So if you know about type hints, it would be great to go over the type hints that are currently in use and make sure they are indeed correct and not too restrictive like this I also want to note that this is a low priority issue |
We removed the mypy check in CI, so there are no longer mypy errors, but if someone knows about type hints and can help it would be nice to still check the type hints we do have |
The latest mypy version now checks more files, see #1528 (comment). The errors listed in the comment should be fixed. The couple comments after the linked one explain how to do so.EDIT: The mypy errors encountered while using typing copilot are only the tip of the iceberg, we should check the current type hints and make sure that inputs are only type hinted as tuple or lists when they must be of that type and use sequence or iterator otherwise.
Note: the priority of this is low, the code works perfectly fine, this only affects users of mypy on arviz that will get error false positives, mypy will complain about the types when the code has no issues.
The text was updated successfully, but these errors were encountered: