Skip to content
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

New traceback formatting with stack_data #38

Closed
10 tasks done
aroberge opened this issue Aug 27, 2022 · 2 comments
Closed
10 tasks done

New traceback formatting with stack_data #38

aroberge opened this issue Aug 27, 2022 · 2 comments

Comments

@aroberge
Copy link
Contributor

aroberge commented Aug 27, 2022

See friendly-traceback/friendly-traceback#152

Note: some statements like

raise LookupError("Fake message")

used to be entirely highlighted. However, after working on issue 152 mentioned above, with the latest version using stack_data, they are no longer highlighted. This is ok for friendly_traceback, but with the coloured highlighting provided by friendly, it makes sense to highlight them.

Tasks:

  • Upload a new version to Pypi that uses a specific version of friendly_traceback
    After friendly_traceback has been updated
  • Make friendly compatible with this newest version
  • Upload a new version to Pypi
  • Improve highlighting when triple-quote text is present
  • Make sure that single line statement, such as raise LookupError("Fake message") mentioned above, would still be highlighted. The key here is to look for a line indicator, -->, with no corresponding ^ markers. Edit With the new hihglighting of the line number itself, it does not seem necessary to highlight the entire text; in fact, it would be less attractive to do so.
  • Use Rich's addition for "partial highlights" (need a reference here) to replace my current custom code for background highlighting. My revised version likely works better as the contrast is guaranteed.
  • Check with IPython
  • Check with Jupyter
  • Check with IDLE
  • Upload new version to Pypi.
@aroberge
Copy link
Contributor Author

aroberge commented Sep 1, 2022

The formatting is still not quite right in some cases:
image

aroberge added a commit that referenced this issue Sep 1, 2022
@aroberge
Copy link
Contributor Author

aroberge commented Sep 1, 2022

image

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

No branches or pull requests

1 participant