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

Remove unnecessary else / elif used after return/raise #84

Merged
merged 3 commits into from
Jun 23, 2022
Merged

Remove unnecessary else / elif used after return/raise #84

merged 3 commits 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

The goal of this PR is to remove unnecessary else / elif used after return/raise.

Rationale

If the last statement of the main if/elif block is a return statement, the use of else or elif becomes superfluous and can be omitted. If an elif follows a return, it can be written as a separate if block.
Instructions can be moved out of else blocks after a return.

Refactoring the code in this way can improve readability and make it easier to maintain.

Testing/Review Recommendations

void

Future Work

void

@LeStarch LeStarch merged commit 07ec79b into nasa:devel Jun 23, 2022
@ThibFrgsGmz ThibFrgsGmz deleted the feat/rm-unneeded_elif branch July 20, 2022 21:28
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