From 817351b08b5266fd5d85cbf56eeaeea726caed25 2020-10-12 20:40:43 From: Matthias Bussonnier Date: 2020-10-12 20:40:43 Subject: [PATCH] Merge pull request #12607 from Carreau/auto-backport-of-pr-12601-on-7.x Redo PR #12601: Always display last frame when show tracebacks with h… --- diff --git a/IPython/core/ultratb.py b/IPython/core/ultratb.py index 45e22bd..4358ea5 100644 --- a/IPython/core/ultratb.py +++ b/IPython/core/ultratb.py @@ -886,9 +886,10 @@ class VerboseTB(TBTools): frames = [] skipped = 0 - for r in records[:last_unique+recursion_repeat+1]: + lastrecord = len(records) - 1 + for i, r in enumerate(records[: last_unique + recursion_repeat + 1]): if self.skip_hidden: - if r[0].f_locals.get("__tracebackhide__", 0): + if r[0].f_locals.get("__tracebackhide__", 0) and i != lastrecord: skipped += 1 continue if skipped: