-
Notifications
You must be signed in to change notification settings - Fork 264
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
Add type hints to ann, meta #883
Conversation
|
I'm not too sure why travis has not run on this: it's only showing 1 successful check (on Appveyor)... |
I've run
This could be due to an updated version of mypy so try |
@drvinceknight The |
I've taken a brief look @janga1997 but I'm afraid I don't see what the right way to do it is here... I can try and take another look during the week at some point if you don't find a way to do it. |
The staticmethod related error is literally saying that type signature of the child class meta_strategy method is different than the parent class, which is technically correct. It's just not clear why that is an error. The second issue is a bit more subtle. The decorated classes are created at runtime so the type checker thinks that the base strategy type either doesn't exist or is invalid. This may be a limitation of mypy, and there may be a workaround where we declare these players to be instances or child classes of MetaPlayer. |
@janga1997 Do you want break out the ann and apavlov changes so we can merge those while we sort the metaplayer issues? |
@marcharper I've not been able to find the time recently. |
We've had some failures back:
|
Add remaining type hints type hint for distribution Edits to ann.py remove meta
@drvinceknight I forgot to remove |
Great! Travis is happy (and both |
#808
In ann.py, I am not really sure what the type of
weights
is supposed to be. I think it should be a list, but it could also be an numpy array? Any other iterable?In meta.py , What is
team
's type supposed to be?I am not sure, but I think these are the last of the strategies to add type hints to.