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

_plequal: marginally reduce cyclomatic complexity #223

Merged
merged 2 commits into from
Dec 28, 2024

Conversation

jayaddison
Copy link
Contributor

This may or may not be an improvement; please feel free to close this if it does not seem valuable or more comprehensible than the existing code.

I was briefly puzzled by the seemingly-identical if ... conditions that currently exist here (L2608-L2611) compared to here -- in fact my first suggestion for a PR here was going to be to remove the second pair of those as redundant, before I ran the test suite and encountered failures.

However, in hindsight it's not all that difficult to infer that updating the instance dictionary attribute affects the logic of those functions (a little unusual perhaps because pl is a callable argument, not accessed via self to make it obviously an instance method, but it's still understandable).

@jayaddison
Copy link
Contributor Author

NB: this changeset relates to issue #122.

@jaraco jaraco merged commit 8e2f1cf into jaraco:main Dec 28, 2024
15 of 16 checks passed
@jayaddison jayaddison deleted the issue-122/reduce-plequal-complexity branch December 28, 2024 17:38
@jayaddison
Copy link
Contributor Author

Thanks again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants