Skip to content
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

Reduce match init complexity #1454

Merged
merged 2 commits into from
Nov 13, 2024
Merged

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
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