Skip to content

Commit 6842372

Browse files
committed
fix: Don't output empty change for removed objects when using GitHub output format (check command)
Issue-349: #349
1 parent a2f320f commit 6842372

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/_griffe/diff.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -219,10 +219,10 @@ def _explain_github(self) -> str:
219219
title = f"title={self._format_title()}"
220220
explanation = f"::warning {location},{title}::{self.kind.value}"
221221
old = self._format_old_value()
222-
if old != "unset":
222+
if old and old != "unset":
223223
old = f"`{old}`"
224224
new = self._format_new_value()
225-
if new != "unset":
225+
if new and new != "unset":
226226
new = f"`{new}`"
227227
if old and new:
228228
change = f"{old} -> {new}"

0 commit comments

Comments
 (0)