Skip to content

Commit

Permalink
skipping ~~^^ lines in python 3.11+ when they directly follow the dat…
Browse files Browse the repository at this point in the history
…a stack
  • Loading branch information
kurtbrose committed Oct 25, 2023
1 parent a853395 commit d0e15c9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions glom/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,10 @@ def _finalize(self, scope):
break
limit += 1
self._tb_lines = tb_lines[-limit:]
# if the first line is trying to put a caret at a byte-code location on a line that
# isn't being displayed, skip it
if set(self._tb_lines[0]) <= {' ', '^', '~'}:
self._tb_lines = self._tb_lines[1:]
self._scope = scope

def __str__(self):
Expand Down

0 comments on commit d0e15c9

Please sign in to comment.