attrs example, version bump

This commit is contained in:
Will McGugan 2021-05-12 18:18:17 +01:00
parent 22e95c9b10
commit 7d02d29ba8
3 changed files with 8 additions and 13 deletions

View File

@ -5,7 +5,7 @@ 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).
## [10.2.0] - Unreleased
## [10.2.0] - 2021-05-12
### Added

View File

@ -41,18 +41,13 @@ if __name__ == "__main__":
)
from rich.console import Console
from rich.pretty import Pretty
from rich.table import Column, Table
from rich.text import Text
console = Console()
console.print(
"\nRich can pretty print [b]attrs[/b] objects ( https://www.attrs.org/en/stable/ )\n",
justify="center",
)
table = Table("attrs *with* Rich", Column(Text.from_markup("attrs *without* Rich")))
console.rule("attrs without Rich")
print(model)
console.rule("attrs with Rich")
console.print(model)
table.add_row(Pretty(model), repr(model))
console.print(table)

View File

@ -2,7 +2,7 @@
name = "rich"
homepage = "https://github.com/willmcgugan/rich"
documentation = "https://rich.readthedocs.io/en/latest/"
version = "10.1.0"
version = "10.2.0"
description = "Render rich text, tables, progress bars, syntax highlighting, markdown and more to the terminal"
authors = ["Will McGugan <willmcgugan@gmail.com>"]
license = "MIT"