Skip to content

Commit

Permalink
Merge pull request #2657 from Textualize/locals-max-length
Browse files Browse the repository at this point in the history
fix for locals max length
  • Loading branch information
willmcgugan committed Dec 4, 2022
2 parents 73c58a3 + af579fd commit 2ab480d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Fixed

- Fixed issue with `locals_max_length` parameter not being respected in Traceback https://github.com/Textualize/rich/issues/2649
- Handling of broken `fileno` made more robust. Fixes https://github.com/Textualize/rich/issues/2645
- Fixed missing `fileno` on FileProxy

Expand Down
1 change: 1 addition & 0 deletions rich/pretty.py
Original file line number Diff line number Diff line change
Expand Up @@ -371,6 +371,7 @@ def __rich_measure__(
indent_size=self.indent_size,
max_length=self.max_length,
max_string=self.max_string,
max_depth=self.max_depth,
expand_all=self.expand_all,
)
text_width = (
Expand Down
7 changes: 6 additions & 1 deletion rich/traceback.py
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,12 @@ def from_exception(
Traceback: A Traceback instance that may be printed.
"""
rich_traceback = cls.extract(
exc_type, exc_value, traceback, show_locals=show_locals
exc_type,
exc_value,
traceback,
show_locals=show_locals,
locals_max_length=locals_max_length,
locals_max_string=locals_max_string,
)
return cls(
rich_traceback,
Expand Down

0 comments on commit 2ab480d

Please sign in to comment.