Skip to content

Commit

Permalink
Merge pull request #2643 from ksun212/master
Browse files Browse the repository at this point in the history
Add the type annotation `str` for `pretty.Node.key_separator`
  • Loading branch information
willmcgugan committed Nov 30, 2022
2 parents ea68762 + 82e76d2 commit 5baaf50
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Bumped minimum Python version to 3.7 https://github.com/Textualize/rich/pull/2567
- Pretty-printing of "tagged" `__repr__` results is now greedy when matching tags https://github.com/Textualize/rich/pull/2565

### Added
- Add type annotation for key_separator of pretty.Node https://github.com/Textualize/rich/issues/2625

## [12.6.0] - 2022-10-02

### Added
Expand Down
1 change: 1 addition & 0 deletions CONTRIBUTORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,4 @@ The following people have contributed to the development of Rich:
- [Tomer Shalev](https://github.com/tomers)
- [Serkan UYSAL](https://github.com/uysalserkan)
- [Zhe Huang](https://github.com/onlyacat)
- [Ke Sun](https://github.com/ksun212)
2 changes: 1 addition & 1 deletion rich/pretty.py
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,7 @@ class Node:
is_tuple: bool = False
is_namedtuple: bool = False
children: Optional[List["Node"]] = None
key_separator = ": "
key_separator: str = ": "
separator: str = ", "

def iter_tokens(self) -> Iterable[str]:
Expand Down

0 comments on commit 5baaf50

Please sign in to comment.