Skip to content

Commit

Permalink
πŸ‘Œ early exit from process_warnings if no warnings (#1287)
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisjsewell authored Sep 12, 2024
1 parent cc7f9a6 commit ea21267
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions sphinx_needs/warnings.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ def process_warnings(app: Sphinx, exception: Exception | None) -> None:
if exception:
return

# If no warnings were defined, we do not need to do anything
if not NEEDS_CONFIG.warnings:
return

env = app.env
needs = SphinxNeedsData(env).get_needs_view()
# If no needs were defined, we do not need to do anything
Expand Down

0 comments on commit ea21267

Please sign in to comment.