Skip to content

Commit 720800e

Browse files
committed
fix tab size issue
1 parent 4037906 commit 720800e

File tree

3 files changed

+11
-2
lines changed

3 files changed

+11
-2
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [13.5.2] - 2023-08-01
9+
10+
### Fixed
11+
12+
- Fixed Text.expand_tab assertion error
13+
814
## [13.5.1] - 2023-07-31
915

1016
### Fixed
@@ -1988,6 +1994,7 @@ Major version bump for a breaking change to `Text.stylize signature`, which corr
19881994

19891995
- First official release, API still to be stabilized
19901996

1997+
[13.5.2]: https://github.com/textualize/rich/compare/v13.5.1...v13.5.2
19911998
[13.5.1]: https://github.com/textualize/rich/compare/v13.5.0...v13.5.1
19921999
[13.5.0]: https://github.com/textualize/rich/compare/v13.4.2...v13.5.0
19932000
[13.4.2]: https://github.com/textualize/rich/compare/v13.4.1...v13.4.2

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
name = "rich"
33
homepage = "https://github.com/Textualize/rich"
44
documentation = "https://rich.readthedocs.io/en/latest/"
5-
version = "13.5.1"
5+
version = "13.5.2"
66
description = "Render rich text, tables, progress bars, syntax highlighting, markdown and more to the terminal"
77
authors = ["Will McGugan <willmcgugan@gmail.com>"]
88
license = "MIT"

rich/text.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -819,7 +819,9 @@ def expand_tabs(self, tab_size: Optional[int] = None) -> None:
819819
return
820820
if tab_size is None:
821821
tab_size = self.tab_size
822-
assert tab_size is not None
822+
if tab_size is None:
823+
tab_size = 8
824+
823825
result = self.blank_copy()
824826

825827
new_text: List[Text] = []

0 commit comments

Comments
 (0)