Skip to content

fix(JinjaSetup): remove unreachable return None; use Exception not BaseException - #168

Open
SoundMatt wants to merge 1 commit into
COVESA:masterfrom
SoundMatt:fix/jinjasetup-dead-code-and-base-exception
Open

fix(JinjaSetup): remove unreachable return None; use Exception not BaseException#168
SoundMatt wants to merge 1 commit into
COVESA:masterfrom
SoundMatt:fix/jinjasetup-dead-code-and-base-exception

Conversation

@SoundMatt

Copy link
Copy Markdown
Contributor

Two small fixes in JinjaSetup.py:

  1. return None at the bottom of render_node is unreachable: every code path above it either raises or returns a value. Removed.
  2. GeneratorError subclassed BaseException directly, which bypasses normal except Exception handlers in calling code. Changed to subclass Exception.

…seException

Two small fixes:
1. `return None` at the end of `render_node` is unreachable: every
   code path before it either raises or returns. Removed.
2. `GeneratorError` subclassed `BaseException` directly, bypassing
   normal `except Exception` handlers. Changed to `Exception`.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

Signed-off-by: Matt Jones <47545907+SoundMatt@users.noreply.github.com>
@gunnar-mb

Copy link
Copy Markdown
Collaborator

Similar to #167
Combine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants