Skip to content

Commit

Permalink
Merge branch 'master' into case-insensitive-prompt-choices
Browse files Browse the repository at this point in the history
  • Loading branch information
darrenburns authored Nov 7, 2023
2 parents fb556c7 + c7d6215 commit b3877fe
Show file tree
Hide file tree
Showing 34 changed files with 602 additions and 672 deletions.
1 change: 0 additions & 1 deletion .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
# These are supported funding model platforms

ko_fi: textualize
2 changes: 1 addition & 1 deletion .github/workflows/pythonpackage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
strategy:
matrix:
os: [windows-latest, ubuntu-latest, macos-latest]
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11.0"]
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11.0", "3.12.0-rc.3"]
defaults:
run:
shell: bash
Expand Down
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ repos:
- id: check-ast
- id: check-builtin-literals
- id: check-case-conflict
- id: check-docstring-first
- id: check-merge-conflict
- id: check-json
- id: check-toml
Expand All @@ -35,9 +34,10 @@ repos:
hooks:
- id: black
exclude: ^benchmarks/
- repo: https://github.com/PyCQA/isort
rev: 5.10.1
- repo: https://github.com/pycqa/isort
rev: 5.12.0
hooks:
- id: isort
exclude: ^benchmarks/
name: isort (python)
language_version: "3.11"
args: ["--profile", "black"]
56 changes: 54 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,60 @@ 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]

### Added

- Added a `case_insensitive` parameter to `prompt.Prompt`. This allows the
`choices` list to be accepted without regard to case. Defaults to `False`.

## [13.6.0] - 2023-09-30

### Added

- Added Python 3.12 to classifiers.

## [13.5.3] - 2023-09-17

### Fixed

- Markdown table rendering issue with inline styles and links https://github.com/Textualize/rich/issues/3115
- Fix Markdown code blocks on a light background https://github.com/Textualize/rich/issues/3123

## [13.5.2] - 2023-08-01

### Fixed

- Fixed Text.expand_tabs assertion error

## [13.5.1] - 2023-07-31

### Fixed

- Fix tilde character (`~`) not included in link regex when printing to console https://github.com/Textualize/rich/issues/3057

## [13.5.0] - 2023-07-29

### Fixed

- Fixed Text.expand_tabs not expanding spans.
- Fixed TimeElapsedColumn from showing negative.
- Fix for escaping strings with a trailing backslash https://github.com/Textualize/rich/issues/2987
- Fixed exception in Markdown with partial table https://github.com/Textualize/rich/issues/3053
- Fixed the HTML export template so that the `<html>` tag comes before the `<head>` tag https://github.com/Textualize/rich/issues/3021
- Fixed issue with custom classes overwriting `__eq__` https://github.com/Textualize/rich/issues/2875
- Fix rich.pretty.install breakage in iPython https://github.com/Textualize/rich/issues/3013

### Added

- Added Text.extend_style method.
- Added Span.extend method.

### Changed

- Text.tab_size now defaults to `None` to indicate that Console.tab_size should be used.

## [13.4.2] - 2023-06-12

### Changed
Expand Down Expand Up @@ -83,7 +130,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Fixed failing tests due to Pygments dependency https://github.com/Textualize/rich/issues/2757
- Relaxed ipywidgets https://github.com/Textualize/rich/issues/2767

### Added
### Added

- Added `encoding` parameter in `Theme.read`

Expand Down Expand Up @@ -944,7 +991,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added

- Added rich.live https://github.com/textualize/rich/pull/382
- Added algin parameter to Rule and Console.rule
- Added align parameter to Rule and Console.rule
- Added rich.Status class and Console.status
- Added getitem to Text
- Added style parameter to Console.log
Expand Down Expand Up @@ -1967,6 +2014,11 @@ Major version bump for a breaking change to `Text.stylize signature`, which corr

- First official release, API still to be stabilized

[13.6.0]: https://github.com/textualize/rich/compare/v13.5.3...v13.6.0
[13.5.3]: https://github.com/textualize/rich/compare/v13.5.2...v13.5.3
[13.5.2]: https://github.com/textualize/rich/compare/v13.5.1...v13.5.2
[13.5.1]: https://github.com/textualize/rich/compare/v13.5.0...v13.5.1
[13.5.0]: https://github.com/textualize/rich/compare/v13.4.2...v13.5.0
[13.4.2]: https://github.com/textualize/rich/compare/v13.4.1...v13.4.2
[13.4.1]: https://github.com/textualize/rich/compare/v13.4.0...v13.4.1
[13.4.0]: https://github.com/textualize/rich/compare/v13.3.5...v13.4.0
Expand Down
3 changes: 3 additions & 0 deletions CONTRIBUTORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ The following people have contributed to the development of Rich:
- [Ed Davis](https://github.com/davised)
- [Pete Davison](https://github.com/pd93)
- [James Estevez](https://github.com/jstvz)
- [Aryaz Eghbali](https://github.com/AryazE)
- [Oleksis Fraga](https://github.com/oleksis)
- [Andy Gimblett](https://github.com/gimbo)
- [Michał Górny](https://github.com/mgorny)
Expand Down Expand Up @@ -51,6 +52,7 @@ The following people have contributed to the development of Rich:
- [Clément Robert](https://github.com/neutrinoceros)
- [Brian Rutledge](https://github.com/bhrutledge)
- [Tushar Sadhwani](https://github.com/tusharsadhwani)
- [Luca Salvarani](https://github.com/LukeSavefrogs)
- [Paul Sanders](https://github.com/sanders41)
- [Tim Savage](https://github.com/timsavage)
- [Anthony Shaw](https://github.com/tonybaloney)
Expand All @@ -70,3 +72,4 @@ The following people have contributed to the development of Rich:
- [Qiming Xu](https://github.com/xqm32)
- [James Addison](https://github.com/jayaddison)
- [Pierro](https://github.com/xpierroz)
- [Bernhard Wagner](https://github.com/bwagner)
2 changes: 1 addition & 1 deletion README.pt-br.md
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ O screenshot a seguir é do resultado do [exemplo de colunas](https://github.com

O Rich pode renderizar [markdown](https://rich.readthedocs.io/en/latest/markdown.html) e faz um bom trabalho de conversão do formato para o terminal.

Para renderizar markdowm, importe a classe `Markdown` e instancie com a string que contém o código markdown. Depois, imprima o objeto no console. Por exemplo:
Para renderizar markdown, importe a classe `Markdown` e instancie com a string que contém o código markdown. Depois, imprima o objeto no console. Por exemplo:

```python
from rich.console import Console
Expand Down
2 changes: 1 addition & 1 deletion docs/source/markup.rst
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ Escaping is important if you construct console markup dynamically, with ``str.fo
def greet(name):
console.print(f"Hello {name}!")

Calling ``greet("Will")`` will print a greeting, but if you were to call ``greet("[blink]Gotcha![/blink]"])`` then you will also get blinking text, which may not be desirable. The solution is to escape the arguments::
Calling ``greet("Will")`` will print a greeting, but if you were to call ``greet("[blink]Gotcha![/blink]")`` then you will also get blinking text, which may not be desirable. The solution is to escape the arguments::

from rich.markup import escape
def greet(name):
Expand Down
2 changes: 1 addition & 1 deletion docs/source/style.rst
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ You can parse a style definition explicitly with the :meth:`~rich.style.Style.pa
Style Themes
------------

If you re-use styles it can be a maintenance headache if you ever want to modify an attribute or color -- you would have to change every line where the style is used. Rich provides a :class:`~rich.theme.Theme` class which you can use to define custom styles that you can refer to by name. That way you only need to update your styles in one place.
If you reuse styles it can be a maintenance headache if you ever want to modify an attribute or color -- you would have to change every line where the style is used. Rich provides a :class:`~rich.theme.Theme` class which you can use to define custom styles that you can refer to by name. That way you only need to update your styles in one place.

Style themes can make your code more semantic, for instance a style called ``"warning"`` better expresses intent that ``"italic magenta underline"``.

Expand Down
Loading

0 comments on commit b3877fe

Please sign in to comment.