Skip to content

Add type hints to mock-player #834

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 3 commits into from
Feb 1, 2017

Conversation

janga1997
Copy link
Member

@janga1997 janga1997 commented Jan 30, 2017

@marcharper @drvinceknight
Fixes part of #808

  1. Is the paramter actions just a list of actions? That is List[axelrod.actions.Action]?

  2. I still don't understand what history is. I know it is a list, but of what I don't know.

  3. And I think the type of state_dist is collections.defaultdict.

@marcharper
Copy link
Member

marcharper commented Jan 31, 2017

History is a list of actions, same for actions. state_dist a defaultdict (of int but I'm not sure if you can test that).

@janga1997
Copy link
Member Author

So history has the same type of actions. Okay
For state_dist should I just keep the type as collections.defaultdict?

@marcharper
Copy link
Member

Yeah I think just a defaultdict.

@marcharper
Copy link
Member

This one typechecks so far. I'll run the checker again after you make updates for the types you asked about.

@marcharper
Copy link
Member

Just __init__ -> None for this one and then I think it's good.

@drvinceknight drvinceknight merged commit cc10416 into Axelrod-Python:master Feb 1, 2017
@janga1997 janga1997 deleted the typeHint-mockPlayer branch February 1, 2017 11:00
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