Skip to content

fix(traceback): highlight win32 paths #3734

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

abesto
Copy link
Contributor

@abesto abesto commented May 13, 2025

Type of changes

  • Bug fix
  • New feature
  • Documentation / docstrings
  • Tests
  • Other

Checklist

  • I've run the latest black with default args on new code.
  • I've updated CHANGELOG.md and CONTRIBUTORS.md where appropriate.
  • I've added tests for new code.
  • 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.

@codecov-commenter
Copy link

codecov-commenter commented May 13, 2025

⚠️ 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 ✅

Project coverage is 97.98%. Comparing base (225cb07) to head (54d224f).
Report is 35 commits behind head on master.

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

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3734      +/-   ##
==========================================
- Coverage   98.24%   97.98%   -0.27%     
==========================================
  Files          74       74              
  Lines        8105     8142      +37     
==========================================
+ Hits         7963     7978      +15     
- Misses        142      164      +22     
Flag Coverage Δ
unittests 97.98% <100.00%> (-0.27%) ⬇️

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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

`PathHighlighter` uses a regex to parse paths for highlighting.
It used `/` as the final path component delimiter. This diff
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 abesto force-pushed the fix/path-highlighter-windows branch from 0d3d5cf to 54d224f Compare May 13, 2025 14:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants