Skip to content

refactor: remove unnecessary else after raise#15

Open
deepsource-autofix[bot] wants to merge 2 commits into
masterfrom
deepsource-autofix-092e92a6
Open

refactor: remove unnecessary else after raise#15
deepsource-autofix[bot] wants to merge 2 commits into
masterfrom
deepsource-autofix-092e92a6

Conversation

@deepsource-autofix
Copy link
Copy Markdown

This PR refactors control flow by eliminating redundant else blocks following a raise statement, improving readability and reducing dead code.

  • Unnecessary else/elif used after raise: The original code had an else: branch immediately after a raise, which can never execute due to the exception interrupting flow. We removed the else: and dedented the value = iter(value) assignment to simplify the logic and remove unreachable code.

This Autofix was generated by AI. Please review the change before merging.

This PR refactors control flow by eliminating redundant `else` blocks following a `raise` statement, improving readability and reducing dead code.

- Unnecessary `else`/`elif` used after `raise`: The original code had an `else:` branch immediately after a `raise`, which can never execute due to the exception interrupting flow. We removed the `else:` and dedented the `value = iter(value)` assignment to simplify the logic and remove unreachable code.

> This Autofix was generated by AI. Please review the change before merging.
This commit fixes the style issues introduced in e8bf251 according to the output
from Black and Yapf.

Details: #15
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.

0 participants