Skip to content

Commit

Permalink
fix: Don't output empty change for removed objects when using GitHub …
Browse files Browse the repository at this point in the history
…output format (check command)

Issue-349: #349
  • Loading branch information
pawamoy committed Jan 7, 2025
1 parent a2f320f commit 6842372
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/_griffe/diff.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,10 +219,10 @@ def _explain_github(self) -> str:
title = f"title={self._format_title()}"
explanation = f"::warning {location},{title}::{self.kind.value}"
old = self._format_old_value()
if old != "unset":
if old and old != "unset":
old = f"`{old}`"
new = self._format_new_value()
if new != "unset":
if new and new != "unset":
new = f"`{new}`"
if old and new:
change = f"{old} -> {new}"
Expand Down

0 comments on commit 6842372

Please sign in to comment.