Skip to content

Commit

Permalink
Merge branch 'master' of github.com:Textualize/rich into benchmark
Browse files Browse the repository at this point in the history
  • Loading branch information
darrenburns committed Mar 10, 2022
2 parents c80ad26 + 92fb4b6 commit c2f5ddb
Show file tree
Hide file tree
Showing 20 changed files with 1,491 additions and 174 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
.pytype
.DS_Store
.vscode
.idea/
mypy_report
docs/build
docs/source/_build
Expand Down
13 changes: 9 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@

# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## Unreleased
## [12.0.0] - 2022-03-10

### Added

Expand All @@ -15,6 +14,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Added ProgressColumn `MofNCompleteColumn` to display raw `completed/total` column (similar to DownloadColumn,
but displays values as ints, does not convert to floats or add bit/bytes units).
https://github.com/Textualize/rich/pull/1941
- Replace Colorama with win32 renderer https://github.com/Textualize/rich/pull/1993
- Add support for namedtuples to `Pretty` https://github.com/Textualize/rich/pull/2031

### Fixed
Expand All @@ -24,13 +24,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Fix syntax lexer guessing.
- Fixed Pretty measure not respecting expand_all https://github.com/Textualize/rich/issues/1998
- Collapsed definitions for single-character spinners, to save memory and reduce import time.
- Fix print_json indent type in __init__.py
- Fix print_json indent type in `__init__.py`
- Fix error when inspecting object defined in REPL https://github.com/Textualize/rich/pull/2037
- Fix incorrect highlighting of non-indented JSON https://github.com/Textualize/rich/pull/2038
- Fixed height reset in complex renderables https://github.com/Textualize/rich/issues/2042

### Changed

- Improved support for enum.Flag in ReprHighlighter https://github.com/Textualize/rich/pull/1920
- Tree now respects justify=None, i.e. won't pad to right https://github.com/Textualize/rich/issues/1690
- Removed rich.tabulate which was marked for deprecation
- Deprecated rich.align.AlignValues in favor of AlignMethod

## [11.2.0] - 2022-02-08

Expand Down Expand Up @@ -1659,7 +1663,8 @@ Major version bump for a breaking change to `Text.stylize signature`, which corr

- First official release, API still to be stabilized

[Unreleased]: https://github.com/willmcgugan/rich/compare/v11.0.0...HEAD
[unreleased]: https://github.com/willmcgugan/rich/compare/v12.0.0...HEAD
[12.0.0]: https://github.com/willmcgugan/rich/compare/v11.2.0...v12.0.0
[11.2.0]: https://github.com/willmcgugan/rich/compare/v11.1.0...v11.2.0
[11.1.0]: https://github.com/willmcgugan/rich/compare/v11.0.0...v11.1.0
[11.0.0]: https://github.com/willmcgugan/rich/compare/v10.16.1...v11.0.0
Expand Down
3 changes: 0 additions & 3 deletions mypy.ini
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,5 @@ ignore_missing_imports = True
[mypy-commonmark.*]
ignore_missing_imports = True

[mypy-colorama.*]
ignore_missing_imports = True

[mypy-ipywidgets.*]
ignore_missing_imports = True
20 changes: 10 additions & 10 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "rich"
homepage = "https://github.com/willmcgugan/rich"
documentation = "https://rich.readthedocs.io/en/latest/"
version = "11.2.0"
version = "12.0.0"
description = "Render rich text, tables, progress bars, syntax highlighting, markdown and more to the terminal"
authors = ["Will McGugan <[email protected]>"]
license = "MIT"
Expand Down Expand Up @@ -31,7 +31,6 @@ typing-extensions = { version = ">=3.7.4, <5.0", python = "<3.8" }
dataclasses = { version = ">=0.7,<0.9", python = "<3.7" }
pygments = "^2.6.0"
commonmark = "^0.9.0"
colorama = "^0.4.0"
ipywidgets = { version = "^7.5.1", optional = true }


Expand Down
5 changes: 1 addition & 4 deletions rich/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,10 +226,7 @@ def iter_last(values: Iterable[T]) -> Iterable[Tuple[bool, T]]:
console.print(test_card)
taken = round((process_time() - start) * 1000.0, 1)

text = console.file.getvalue()
# https://bugs.python.org/issue37871
for line in text.splitlines(True):
print(line, end="")
Console().print(test_card)

print(f"rendered in {pre_cache_taken}ms (cold cache)")
print(f"rendered in {taken}ms (warm cache)")
Expand Down
Loading

0 comments on commit c2f5ddb

Please sign in to comment.