Add a type annotation

Add the type annotation for Node.pretty.key_separator
This commit is contained in:
ksun212 2022-11-13 15:23:59 +08:00
parent 5f4e93efb1
commit 73ec0d586e
2 changed files with 4 additions and 1 deletions

View File

@ -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

View File

@ -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]: