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

Traceback: Expose local rendering options in install #3415

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

IoannisP-ITENG
Copy link

@IoannisP-ITENG IoannisP-ITENG commented Jul 6, 2024

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

Add locals_max_depth and locals_overflow to tracebacks to enable truncating deep objects or wrapping long strings.

    install(
        width=500,
        extra_lines=3,
        theme=None,
        word_wrap=True,
        show_locals=True,
        locals_max_length=10,
        locals_max_string=1000,
        locals_max_depth=3,
        locals_hide_dunder=True,
        locals_hide_sunder=True,
        locals_overflow="fold",
        indent_guides=True,
        suppress=(),
        max_frames=10,
    )

image

Add locals_max_depth and locals_overflow to tracebacks
@IoannisP-ITENG IoannisP-ITENG force-pushed the feature/expose_local_rendering_options_in_traceback branch from 7d52649 to c076b05 Compare July 6, 2024 18:23
@ruben-iteng
Copy link

Hey! @willmcgugan @darrenburns do you have any comments on this PR? This would make using the tracebacks even more usable 😊

@willmcgugan
Copy link
Collaborator

master has changed since you did this. Would you mind resolving the conflicts? LGTM otherwise.

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.

3 participants