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

Simplify args predicate with all() #76

Merged
merged 1 commit into from
Jun 23, 2022
Merged

Simplify args predicate with all() #76

merged 1 commit into from
Jun 23, 2022

Conversation

ThibFrgsGmz
Copy link
Contributor

Originating Project/Creator
Affected Component
Affected Architectures(s)
Related Issue(s) void
Has Unit Tests (y/n) n
Builds Without Errors (y/n) Let CI run
Unit Tests Pass (y/n) Let CI run
Documentation Included (y/n) n

Change Description

This PR aims to simplify the determination whether or not the given array satisfies the given argument specification for the predicates.

Rationale

Using Python's built-in all() functions is a more concise way to do this than using a for loo.
all() will only return True if all elements evaluate to True.

Testing/Review Recommendations

To understand better, use any() and then reverse the condition to get all().

Future Work

void

@LeStarch LeStarch merged commit 23fd3a6 into nasa:devel Jun 23, 2022
@ThibFrgsGmz ThibFrgsGmz deleted the feat/use_any_then_all branch August 19, 2022 19:12
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.

None yet

2 participants