Skip to content

Conversation

@gaffney2010
Copy link
Member

A few minor changes to improve readability on Match init:

  • Set fields in the same order as the function arguments.
  • Reduce unnecessary elses.
  • Change difficult-to-parse default dict.

@gaffney2010
Copy link
Member Author

I'll figure out why the test is failing.

@gaffney2010 gaffney2010 closed this Nov 6, 2024
@gaffney2010 gaffney2010 reopened this Nov 11, 2024
@drvinceknight
Copy link
Member

Looks good to me.

@gaffney2010 gaffney2010 merged commit 75f6e77 into Axelrod-Python:dev Nov 13, 2024
13 checks passed

self.match_attributes = match_attributes
if match_attributes is None:
# known_turns = inf if both prob_end and turns are None, else turns
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems inconsistent with the above, no? If both are None then it should be DEFAULT_TURNS.

Also, do we need to repeat the logic here or can we just use self.turns?

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