diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml
index 0729ea9e..2a973c4c 100644
--- a/.github/workflows/codeql.yml
+++ b/.github/workflows/codeql.yml
@@ -29,7 +29,7 @@ jobs:
steps:
- name: Checkout repository
- uses: actions/checkout@v3
+ uses: actions/checkout@v4
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
diff --git a/.github/workflows/codespell.yml b/.github/workflows/codespell.yml
index 2f230307..a3bc9717 100644
--- a/.github/workflows/codespell.yml
+++ b/.github/workflows/codespell.yml
@@ -4,7 +4,7 @@ jobs:
codespell:
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v3
+ - uses: actions/checkout@v4
- run: python3 -m pip install codespell
- run: codespell --ignore-words-list="ba,fo,hel,revered,womens"
--skip="./README.*.md,*.svg,*.ai,./benchmarks/snippets.py,./tests,./tools"
diff --git a/.github/workflows/newissue.yml b/.github/workflows/newissue.yml
index bd8b5a52..2b608039 100644
--- a/.github/workflows/newissue.yml
+++ b/.github/workflows/newissue.yml
@@ -8,7 +8,7 @@ jobs:
permissions:
issues: write
steps:
- - uses: actions/checkout@v3
+ - uses: actions/checkout@v4
with:
ref: master
- name: Install FAQtory
diff --git a/.github/workflows/pythonpackage.yml b/.github/workflows/pythonpackage.yml
index 829c0986..21aafe27 100644
--- a/.github/workflows/pythonpackage.yml
+++ b/.github/workflows/pythonpackage.yml
@@ -13,7 +13,7 @@ jobs:
run:
shell: bash
steps:
- - uses: actions/checkout@v3
+ - uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
diff --git a/.github/workflows/readmechanged.yml b/.github/workflows/readmechanged.yml
index e4729f6a..7511dcd4 100644
--- a/.github/workflows/readmechanged.yml
+++ b/.github/workflows/readmechanged.yml
@@ -11,7 +11,7 @@ jobs:
send_notification:
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v2
+ - uses: actions/checkout@v4
- name: Send notification to README Authors
env:
GITHUB_TOKEN: ${{ secrets.GHP_README_WORKFLOW }}
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 91e65fa3..436aed1f 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -3,7 +3,7 @@
exclude: benchmarks/
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
- rev: v4.0.1
+ rev: v4.4.0
hooks:
- id: check-ast
- id: check-builtin-literals
@@ -17,7 +17,7 @@ repos:
- id: check-vcs-permalinks
- id: check-shebang-scripts-are-executable
- repo: https://github.com/pre-commit/pygrep-hooks
- rev: v1.9.0
+ rev: v1.10.0
hooks:
- id: python-check-mock-methods
- id: python-no-log-warn
@@ -25,12 +25,12 @@ repos:
- id: rst-directive-colons
- id: rst-inline-touching-normal
- repo: https://github.com/hadialqattan/pycln
- rev: v1.2.5
+ rev: v2.2.2
hooks:
- id: pycln
args: [--all]
- repo: https://github.com/psf/black
- rev: 22.3.0
+ rev: 23.7.0
hooks:
- id: black
exclude: ^benchmarks/
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 8f38ab08..34e86652 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -5,13 +5,16 @@ 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]
+## 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`.
+- Adds missing parameters to Panel.fit https://github.com/Textualize/rich/issues/3142
+- Adds a `case_insensitive` parameter to `prompt.Prompt`. This allows the `choices` list to be accepted without regard to case. Defaults to `False`.
+
+### Fixed
+
+- Ensure font is correctly inherited in exported HTML https://github.com/Textualize/rich/issues/3104
## [13.6.0] - 2023-09-30
diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md
index e876a554..1cdc5c31 100644
--- a/CONTRIBUTORS.md
+++ b/CONTRIBUTORS.md
@@ -7,6 +7,7 @@ The following people have contributed to the development of Rich:
- [Patrick Arminio](https://github.com/patrick91)
- [Gregory Beauregard](https://github.com/GBeauregard/pyffstream)
- [Artur Borecki](https://github.com/pufereq)
+- [Pedro Aaron](https://github.com/paaaron)
- [Dennis Brakhane](https://github.com/brakhane)
- [Darren Burns](https://github.com/darrenburns)
- [Jim Crist-Harif](https://github.com/jcrist)
@@ -73,3 +74,4 @@ The following people have contributed to the development of Rich:
- [James Addison](https://github.com/jayaddison)
- [Pierro](https://github.com/xpierroz)
- [Bernhard Wagner](https://github.com/bwagner)
+- [Aaron Beaudoin](https://github.com/AaronBeaudoin)
diff --git a/README.es.md b/README.es.md
index 1ef917d0..d90b98a2 100644
--- a/README.es.md
+++ b/README.es.md
@@ -113,7 +113,7 @@ console.print("Where there is a [bold cyan]Will[/bold cyan] there [u]is[/u] a [i

-Usted puede usar el objeto Console para generar salida sofisticada con mínimo esfuerzo. Ver la [API Console](https://rich.readthedocs.io/en/latest/console.html) docs para detalles.
+Usted puede usar el objeto Console para generar salida sofisticada con mínimo esfuerzo. Ver la documentación [API Console](https://rich.readthedocs.io/en/latest/console.html) para detalles.
## Rich Inspector
@@ -127,7 +127,7 @@ Rich tiene ua función [inspeccionar](https://rich.readthedocs.io/en/latest/refe

-Ver la [docs inspector](https://rich.readthedocs.io/en/latest/reference/init.html#rich.inspect) para detalles.
+Ver la [documentación inspector](https://rich.readthedocs.io/en/latest/reference/init.html#rich.inspect) para detalles.
# Paquete Rich
diff --git a/README.tr.md b/README.tr.md
index 9e440627..35d1f626 100644
--- a/README.tr.md
+++ b/README.tr.md
@@ -29,7 +29,7 @@
Bir Python kütüphanesi olan __rich__, terminal üzerinde gösterişli çıktılar almanızı sağlayan bir araçtır.
-[Rich API](https://rich.readthedocs.io/en/latest/) kullanarak terminal çıktılarınıza sitil ekleyebilir ve renklendirebilirsiniz. Aynı zamanda tabloları, durum çubuklarını, markdown sitillerini, kaynak koddaki syntax gösterimlerini ve bir çok şeyi rich kullanarak yapabilirsiniz.
+[Rich API](https://rich.readthedocs.io/en/latest/) kullanarak terminal çıktılarınıza stil ekleyebilir ve renklendirebilirsiniz. Aynı zamanda tabloları, ilerleme çubuklarını, markdown stillerini, kaynak koddaki söz dizimi gösterimlerini ve bir çok şeyi rich kullanarak yapabilirsiniz.

@@ -39,7 +39,7 @@ Rich'e video ile göz atmak için [@fishnets88](https://twitter.com/fishnets88)
## Uyumluluk
-Rich Linux, OSX ve Windows üzerinde çalışabilir. Windows'un yeni terminali doğru bir şekilde çalışabilir, eski terminalde 16 renk olduğu için istenilen sonuçlar elde edilemeyebilir. Aynı zamanda Rich'in çalışabilmesi için ortamda minimum Python 3.6.3 veya daha yeni bir sürüm olması gerekmektedir.
+Rich Linux, OSX ve Windows üzerinde çalışabilir. Windows'un yeni terminalinde de doğru bir şekilde çalışabilir, eski terminalde 16 renk olduğu için istenilen sonuçlar elde edilemeyebilir. Aynı zamanda Rich'in çalışabilmesi için ortamda minimum Python 3.6.3 veya daha yeni bir sürüm olması gerekmektedir.
Rich [Jupyter notebook](https://jupyter.org/) üzerinde hiç bir ek yükleme gerektirmeden çalışabilir.
@@ -73,7 +73,7 @@ Buradaki yazıyı değiştiremediğim için siz hello world olarak görüyorsunu
## Rich REPL
-Rich Python REPL içerisine yüklenebilir, böylece her hangi bir veri tipini güzelce terminal çıktısı olarak verebilir.
+Rich Python REPL içerisine yüklenebilir, böylece herhangi bir veri tipini güzelce terminal çıktısı olarak verebilir.
```python
>>> from rich import pretty
@@ -92,7 +92,7 @@ from rich.console import Console
console = Console()
```
-Console objesi tıpkı Python içerisinde hazır gelen `print` methoduna benziyor, tabi bir kaç fazlası da var.
+Console objesi tıpkı Python içerisinde hazır gelen `print` methoduna benziyor, tabii daha fazlası da var.
Kullanımı aşağıdaki örnek gibi olacaktır:
```python
@@ -111,7 +111,7 @@ Eğer çıktıyı değiştirmeseydim aşağıdaki gibi bir görüntü ile karş

-Tek seferde bir yazıyı renklendirmek için kullanışlı bir yöntem olsa da, eğer çıktımızın sadece belirli bölgelerinde değişiklik yapacaksak [bbcode](https://en.wikipedia.org/wiki/BBCode) syntax'ını kullanmalıyız. Bunun içinde bir örnek:
+Tek seferde bir yazıyı renklendirmek için kullanışlı bir yöntem olsa da, eğer çıktımızın sadece belirli bölgelerinde değişiklik yapacaksak [bbcode](https://en.wikipedia.org/wiki/BBCode) söz dizimini kullanmalıyız. Bunun için de bir örnek:
```python
console.print("[bold red]Mustafa Kemal Atatürk[/bold red] [u](1881 - 10 Kasım 1938)[/u], [i]Türk asker ve devlet adamıdır[/i]. [bold cyan]Türk Kurtuluş Savaşı'nın başkomutanı ve Türkiye Cumhuriyeti'nin kurucusudur[/bold cyan].")
@@ -119,7 +119,7 @@ console.print("[bold red]Mustafa Kemal Atatürk[/bold red] [u](1881 - 10 Kasım

-Console objesini kullanarak sofistike bir çok çıktıyu minimum efor ile oluşturabilirsiniz. [Console API](https://rich.readthedocs.io/en/latest/console.html) dökümanına göz atarak daha fazla bilgi elde edebilirsiniz.
+Console objesini kullanarak sofistike bir çok çıktıyı minimum efor ile oluşturabilirsiniz. [Console API](https://rich.readthedocs.io/en/latest/console.html) dökümanına göz atarak daha fazla bilgi elde edebilirsiniz.
## Rich Inspect
@@ -133,19 +133,19 @@ Rich [inspect](https://rich.readthedocs.io/en/latest/reference/init.html?highlig

-[Bu dökümana](https://rich.readthedocs.io/en/latest/reference/init.html#rich.inspect) göz atarak daha fazla bilgi elde edebilirsiniz..
+[Bu dökümana](https://rich.readthedocs.io/en/latest/reference/init.html#rich.inspect) göz atarak daha fazla bilgi elde edebilirsiniz...
# Rich Kütüphaneleri
-Rich içerisinde çok fazla sayıda terminal üzerinde kullandığınızda çıktılarınızı gösterişli kılacak yapıyalara sahiptir.
+Rich içerisinde terminal üzerinde kullandığınızda çıktılarınızı gösterişli kılacak çok fazla yapıya sahiptir.
Bu yapıların detayları için ilgili başlıklara tıklayın:
Log
-Console objesi içerisinde `log()` methodunu barındırır, bu tıpkı `print()` methodu gibi davranır fakat buna ek olarak bastırıldığı zamanı da ekrana yansıtır. Bu duruma ek olarak Rich Syntax Highlighting de gerçekleştirir.
-Aşağıda örnek kod parçasını:
+Console objesi içerisinde `log()` methodunu barındırır, bu tıpkı `print()` methodu gibi davranır fakat buna ek olarak bastırıldığı zamanı da ekrana yansıtır. Bu duruma ek olarak Rich Syntax Highlighting'de gerçekleştirir.
+Aşağıda örnek kod parçası:
```python
from rich.console import Console
@@ -196,7 +196,7 @@ Emojileri de kullanabilirsiniz, kullanımı markdown emojileri ile aynı.
😃 🧛 💩 👍 🦝
```
-Bu özelliği doğru yerlerde kullanmakta fayda var tabi.
+Bu özelliği doğru yerlerde kullanmakta fayda var tabii.
@@ -258,7 +258,7 @@ Note that console markup is rendered in the same way as `print()` and `log()`. I
Uzun işlerinizi göstermek için Rich size birden fazla [progress](https://rich.readthedocs.io/en/latest/progress.html) bar sunuyor.
-Basit bir kullanımı için, her hangi bir adımınızı `track` fonksiyonu ile kapsayıp döngüye alın.
+Basit bir kullanım için, herhangi bir adımınızı `track` fonksiyonu ile kapsayıp döngüye alın.
```python
from rich.progress import track
@@ -267,15 +267,15 @@ for step in track(range(100)):
do_step(step)
```
-Aşağıdaki görsellerde de görüleceği üzere birden fazla kez progress bar kullanabilirsiniz, ve dökümandan da anlışılacağı üzere bu hiç de zor bir iş değil.
+Aşağıdaki görsellerde de görüleceği üzere birden fazla kez progress bar kullanabilirsiniz, ve dökümandan da anlaşılacağı üzere bu hiç de zor bir iş değil.

-Kolonlar kullanıcı tarafından ayarlanabilir, indirme hızını, dosya boyutunui yüzdesel olarak gösterimi gibi bir çok şekilde gösterim sağlayabilir.
+Kolonlar kullanıcı tarafından ayarlanabilir, indirme hızını, dosya boyutunu yüzdesel olarak gösterimi gibi bir çok şekilde gösterim sağlayabilir.

-Eğer size de denemek siterseniz [examples/downloader.py](https://github.com/textualize/rich/blob/master/examples/downloader.py) koduna bakarak ve çalıştırarak indirme yapabilirsiniz.
+Eğer siz de denemek isterseniz [examples/downloader.py](https://github.com/textualize/rich/blob/master/examples/downloader.py) koduna bakarak ve çalıştırarak indirme yapabilirsiniz.
@@ -329,7 +329,7 @@ Kodun çıkartacağı görüntü şu olacaktır:

-[tree.py](https://github.com/textualize/rich/blob/master/examples/tree.py) örnek dosyası ile linux'de bulunan `tree` kodunu rich üzerinden simüle edebilirsiniz.
+[tree.py](https://github.com/textualize/rich/blob/master/examples/tree.py) örnek dosyası ile linux'da bulunan `tree` kodunu rich üzerinden simüle edebilirsiniz.
@@ -419,9 +419,9 @@ Yukarıdaki kod parçası aşağıdaki gibi bir çıktı üretecektir.
Tracebacks
-Rich sahip oldukları ile güzel [tracebakcs](https://rich.readthedocs.io/en/latest/traceback.html)'ler yaratabilir. Böylece daha okunabilir ve daha kolay anlaşılabilen bir yapıya sahip olursunuz.
+Rich sahip olduğu güzel [traceback](https://rich.readthedocs.io/en/latest/traceback.html)'ler yaratabilir. Böylece daha okunabilir ve daha kolay anlaşılabilen bir yapıya sahip olursunuz.
-Burada OSX üzerinde (tıpkı Linux gibi) bir tracebacks çıktısı görüyorsunuz.
+Burada OSX üzerinde (tıpkı Linux gibi) bir traceback çıktısı görüyorsunuz.

@@ -431,7 +431,7 @@ Tüm rich yapıları [Console Protocol](https://rich.readthedocs.io/en/latest/pr
# Rich CLI
-Aynı zamanda [Rich CLI](https://github.com/textualize/rich-cli) uygulamasını da kontrol edin. Bu uygulama ile konsol çıktılarınızı renklendirebilir, kod çıktılarınıza syntax uygulayabilir, markdown gösterebilir, CSV dosyasını görüntüleyebilir ve bir çok şey daha yapabilirsiniz.
+Aynı zamanda [Rich CLI](https://github.com/textualize/rich-cli) uygulamasını da kontrol edin. Bu uygulama ile konsol çıktılarınızı renklendirebilir, kod çıktılarınıza syntax uygulayabilir, markdown gösterebilir, CSV dosyasını görüntüleyebilir ve daha bir çok şey yapabilirsiniz.

@@ -444,7 +444,7 @@ Rich'in kardeş projesi olan [Textual](https://github.com/Textualize/textual)'a
# Rich kullanılan Projeler
-[Rich Galeri](https://www.textualize.io/rich/gallery)'si üzerinden, rich kullanılan son uygulamalara [Textualize.io](https://www.textualize.io) üzerinden göz atabiirsiniz.
+[Rich Galeri](https://www.textualize.io/rich/gallery)si üzerinden, rich kullanılan son uygulamalara [Textualize.io](https://www.textualize.io) üzerinden göz atabiirsiniz.
Eğer siz de projenizi galeriye eklemek istiyorsanız [bu adımları](https://www.textualize.io/gallery-instructions) takip ederek ekleyebilirsiniz.
diff --git a/docs/source/progress.rst b/docs/source/progress.rst
index 23693843..272687d9 100644
--- a/docs/source/progress.rst
+++ b/docs/source/progress.rst
@@ -58,7 +58,7 @@ The ``total`` value associated with a task is the number of steps that must be c
Updating tasks
~~~~~~~~~~~~~~
-When you call :meth:`~rich.progress.Progress.add_task` you get back a `Task ID`. Use this ID to call :meth:`~rich.progress.Progress.update` whenever you have completed some work, or any information has changed. Typically you will need to update ``completed`` every time you have completed a step. You can do this by updated ``completed`` directly or by setting ``advance`` which will add to the current ``completed`` value.
+When you call :meth:`~rich.progress.Progress.add_task` you get back a `Task ID`. Use this ID to call :meth:`~rich.progress.Progress.update` whenever you have completed some work, or any information has changed. Typically you will need to update ``completed`` every time you have completed a step. You can do this by setting ``completed`` directly or by setting ``advance`` which will add to the current ``completed`` value.
The :meth:`~rich.progress.Progress.update` method collects keyword arguments which are also associated with the task. Use this to supply any additional information you would like to render in the progress display. The additional arguments are stored in ``task.fields`` and may be referenced in :ref:`Column classes`.
@@ -234,7 +234,7 @@ Here's an example that reads a url from the internet::
If you expect to be reading from multiple files, you can use :meth:`~rich.progress.Progress.open` or :meth:`~rich.progress.Progress.wrap_file` to add a file progress to an existing Progress instance.
-See `cp_progress.py ` for a minimal clone of the ``cp`` command which shows a progress bar as the file is copied.
+See `cp_progress.py `_ for a minimal clone of the ``cp`` command which shows a progress bar as the file is copied.
Multiple Progress
diff --git a/docs/source/tables.rst b/docs/source/tables.rst
index fdc6ec04..f573dbc6 100644
--- a/docs/source/tables.rst
+++ b/docs/source/tables.rst
@@ -50,13 +50,13 @@ Table Options
There are a number of keyword arguments on the Table constructor you can use to define how a table should look.
-- ``title`` Sets the title of the table (text show above the table).
-- ``caption`` Sets the table caption (text show below the table).
+- ``title`` Sets the title of the table (text shown above the table).
+- ``caption`` Sets the table caption (text shown below the table).
- ``width`` Sets the desired width of the table (disables automatic width calculation).
- ``min_width`` Sets a minimum width for the table.
- ``box`` Sets one of the :ref:`appendix_box` styles for the table grid, or ``None`` for no grid.
- ``safe_box`` Set to ``True`` to force the table to generate ASCII characters rather than unicode.
-- ``padding`` An integer, or tuple of 1, 2, or 4 values to set the padding on cells.
+- ``padding`` An integer, or tuple of 1, 2, or 4 values to set the padding on cells (see :ref:`Padding`).
- ``collapse_padding`` If True the padding of neighboring cells will be merged.
- ``pad_edge`` Set to False to remove padding around the edge of the table.
- ``expand`` Set to True to expand the table to the full available size.
diff --git a/docs/source/text.rst b/docs/source/text.rst
index fd6851fb..c5a1add8 100644
--- a/docs/source/text.rst
+++ b/docs/source/text.rst
@@ -28,12 +28,12 @@ Alternatively, you can construct styled text by calling :meth:`~rich.text.Text.a
If you would like to use text that is already formatted with ANSI codes, call :meth:`~rich.text.Text.from_ansi` to convert it to a ``Text`` object::
- text = Text.from_ansi("\033[1mHello, World!\033[0m")
+ text = Text.from_ansi("\033[1;35mHello\033[0m, World!")
console.print(text.spans)
-Since building Text instances from parts is a common requirement, Rich offers :meth:`~rich.text.Text.assemble` which will combine strings or pairs of string and Style, and return a Text instance. The follow example is equivalent to the code above::
+Since building Text instances from parts is a common requirement, Rich offers :meth:`~rich.text.Text.assemble` which will combine strings or pairs of string and Style, and return a Text instance. The following example is equivalent to the ANSI example above::
- text = Text.assemble(("Hello", "bold magenta"), " World!")
+ text = Text.assemble(("Hello", "bold magenta"), ", World!")
console.print(text)
You can apply a style to given words in the text with :meth:`~rich.text.Text.highlight_words` or for ultimate control call :meth:`~rich.text.Text.highlight_regex` to highlight text matching a *regular expression*.
diff --git a/rich/_export_format.py b/rich/_export_format.py
index 998a9b0d..e7527e52 100644
--- a/rich/_export_format.py
+++ b/rich/_export_format.py
@@ -12,7 +12,7 @@ body {{
- {code}
+ {code}