Skip to content

Add type hints to oncebitten, prober, punisher, rand #864

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

Merged
merged 7 commits into from
Feb 19, 2017

Conversation

janga1997
Copy link
Member

#808
Same error as #860 , mypy cannot infer type for empty containers. See here.

@drvinceknight
Copy link
Member

Same error as #860 , mypy cannot infer type for empty containers. See here.

Ok that's good to know. I'm not sure what the best way to deal with this is...

@janga1997
Copy link
Member Author

@drvinceknight Apparently a simple workaround is to add the comment
# type: List[Action]
we can explicitly annotate variables with these type of comments in mypy.
I believe this is the best solution right now, as mypy has no plans to fix this issue.

@drvinceknight
Copy link
Member

I believe this is the best solution right now, as mypy has no plans to fix this issue.

It looks good to me! Nice find :)

@drvinceknight
Copy link
Member

drvinceknight commented Feb 18, 2017

@meatballs Can you merge this PR? And a couple other type hint PRs too which have been reviewed?

Hi @janga1997 we all keep an eye on the PRs. Sorry it's taking us a little while to merge them but there's no need to ping us. We just all happen to be busy right now. They will be merged as soon as possible :)

@janga1997
Copy link
Member Author

@drvinceknight Sorry for the trouble. Won't happen again.

@drvinceknight
Copy link
Member

No trouble at all. All these contributions are awesome. Just a shame they're coming at a time when we seem to all be busy :D

@janga1997
Copy link
Member Author

@drvinceknight I understand. And all the core maintainers have full time jobs.
And you are working while traveling.
I'm just a bored college junior here :-)

@meatballs meatballs merged commit 8d210df into Axelrod-Python:master Feb 19, 2017
@janga1997
Copy link
Member Author

@meatballs Why are the errors showing up after merging master? Is it anything of consequence?

@meatballs
Copy link
Member

No, it's just that I merged it before Travis had run again, so github thinks there was a problem

@janga1997 janga1997 deleted the typeHint8 branch February 19, 2017 16:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants