Skip to content

Commit

Permalink
Changed SnapshotTracer's Webstepper code line number to align with th…
Browse files Browse the repository at this point in the history
…e source code line number
  • Loading branch information
david-yz-liu committed Dec 8, 2024
1 parent 7de71f9 commit 4472e5c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ and adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
- Added reporting for errors raised by custom transforms (`Z3Visitor`, `CFGVisitor`)
- Ensured `SnapshotTracer` does not include the `_trace_func` stack frame
- Enabled `SnapshotTracer` to create its `output_directory` argument if it doesn't already exist
- Changed `SnapshotTracer`'s Webstepper code line number to align with the source code line number

### 💫 New checkers

Expand Down
3 changes: 1 addition & 2 deletions python_ta/debug/snapshot_tracer.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,7 @@ def _trace_func(self, frame: types.FrameType, event: str, _arg: Any) -> None:
**self._snapshot_args,
)

line_number = frame.f_lineno - self._first_line + 1
self._add_svg_to_map(filename, line_number)
self._add_svg_to_map(filename, frame.f_lineno)

def _add_svg_to_map(self, filename: str, line: int) -> None:
"""Add the SVG in filename to self._snapshots"""
Expand Down

0 comments on commit 4472e5c

Please sign in to comment.