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

Use the built-in function next instead of a for-loop #65

Merged
merged 2 commits into from
Jun 16, 2022
Merged

Use the built-in function next instead of a for-loop #65

merged 2 commits into from
Jun 16, 2022

Conversation

ThibFrgsGmz
Copy link
Contributor

Originating Project/Creator
Affected Component xml_loader.py
Affected Architectures(s)
Related Issue(s)
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 use the built-in function next instead of a for-loop in the get_xml_section(section_name, xml_root) function that retrieves the given xml section from the xml tree if it exists.

Rationale

When we choose the first element of an iterable that satisfies a condition, we can use the following built-in function instead of a for-loop to make our code and intent clearer.

Testing/Review Recommendations

void

Future Work

void

@LeStarch LeStarch merged commit a37d9dd into nasa:devel Jun 16, 2022
@ThibFrgsGmz ThibFrgsGmz deleted the feat/use-next branch June 18, 2022 20:19
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