rich icon indicating copy to clipboard operation
rich copied to clipboard

fix(traceback): highlight win32 paths

Open abesto opened this issue 6 months ago • 1 comments

Type of changes

  • [x] Bug fix
  • [ ] New feature
  • [ ] Documentation / docstrings
  • [x] Tests
  • [ ] Other

Checklist

  • [x] I've run the latest black with default args on new code.
  • [x] I've updated CHANGELOG.md and CONTRIBUTORS.md where appropriate.
  • [x] I've added tests for new code.
  • [x] I accept that @willmcgugan may be pedantic in the code review.

Description

PathHighlighter uses a regex to parse paths for highlighting. It used / as the final path component delimiter. This PR changes that to "either / or \".

I toyed with using os.path.sep, but there's no reason to not highlight paths from other OSes than the one we're running on at the moment.

abesto avatar May 13 '25 14:05 abesto

:warning: Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 97.98%. Comparing base (45cc90b) to head (54d224f). Report is 83 commits behind head on master.

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #3734   +/-   ##
=======================================
  Coverage   97.98%   97.98%           
=======================================
  Files          74       74           
  Lines        8142     8142           
=======================================
  Hits         7978     7978           
  Misses        164      164           
Flag Coverage Δ
unittests 97.98% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

:rocket: New features to boost your workflow:
  • :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

codecov-commenter avatar May 13 '25 14:05 codecov-commenter