From b44fd1b337cf3336c68e1127d3f92f0cfefb3b0f Mon Sep 17 00:00:00 2001 From: Darren Burns Date: Tue, 7 Nov 2023 11:23:28 +0000 Subject: [PATCH 01/10] Various docstring fixes, removing unused variables --- rich/markup.py | 3 +++ rich/text.py | 18 +++++++++++------- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/rich/markup.py b/rich/markup.py index cb927edd..bd9c05a7 100644 --- a/rich/markup.py +++ b/rich/markup.py @@ -113,7 +113,10 @@ def render( Args: markup (str): A string containing console markup. + style: (Union[str, Style]): The style to use. emoji (bool, optional): Also render emoji code. Defaults to True. + emoji_variant (str, optional): Optional emoji variant, either "text" or "emoji". Defaults to None. + Raises: MarkupError: If there is a syntax error in the markup. diff --git a/rich/text.py b/rich/text.py index 90b1cb14..b9b35055 100644 --- a/rich/text.py +++ b/rich/text.py @@ -271,7 +271,9 @@ class Text(JupyterMixin): Args: text (str): A string containing console markup. + style (Union[str, Style], optional): Base style for text. Defaults to "". emoji (bool, optional): Also render emoji code. Defaults to True. + emoji_variant (str, optional): Optional emoji variant, either "text" or "emoji". Defaults to None. justify (str, optional): Justify method: "left", "center", "full", "right". Defaults to None. overflow (str, optional): Overflow method: "crop", "fold", "ellipsis". Defaults to None. end (str, optional): Character to end text with. Defaults to "\\\\n". @@ -369,6 +371,7 @@ class Text(JupyterMixin): style (Union[str, Style], optional): Base style for text. Defaults to "". justify (str, optional): Justify method: "left", "center", "full", "right". Defaults to None. overflow (str, optional): Overflow method: "crop", "fold", "ellipsis". Defaults to None. + no_wrap (bool, optional): Disable text wrapping, or None for default. Defaults to None. end (str, optional): Character to end text with. Defaults to "\\\\n". tab_size (int): Number of spaces per tab, or ``None`` to use ``console.tab_size``. Defaults to None. meta (Dict[str, Any], optional). Meta data to apply to text, or None for no meta data. Default to None @@ -424,7 +427,7 @@ class Text(JupyterMixin): self._spans = spans[:] def blank_copy(self, plain: str = "") -> "Text": - """Return a new Text instance with copied meta data (but not the string or spans).""" + """Return a new Text instance with copied metadata (but not the string or spans).""" copy_self = Text( plain, style=self.style, @@ -505,7 +508,7 @@ class Text(JupyterMixin): def apply_meta( self, meta: Dict[str, Any], start: int = 0, end: Optional[int] = None ) -> None: - """Apply meta data to the text, or a portion of the text. + """Apply metadata to the text, or a portion of the text. Args: meta (Dict[str, Any]): A dict of meta information. @@ -823,8 +826,6 @@ class Text(JupyterMixin): if tab_size is None: tab_size = 8 - result = self.blank_copy() - new_text: List[Text] = [] append = new_text.append @@ -899,6 +900,7 @@ class Text(JupyterMixin): Args: count (int): Width of padding. + character (str): The character to pad with. Must be a string of length 1. """ assert len(character) == 1, "Character must be a string of length 1" if count: @@ -1005,6 +1007,9 @@ class Text(JupyterMixin): """Append another Text instance. This method is more performant that Text.append, but only works for Text. + Args: + text (Text): The Text instance to append to this instance. + Returns: Text: Returns self for chaining. """ @@ -1026,7 +1031,7 @@ class Text(JupyterMixin): """Append iterable of str and style. Style may be a Style instance or a str style definition. Args: - pairs (Iterable[Tuple[str, Optional[StyleType]]]): An iterable of tuples containing str content and style. + tokens (Iterable[Tuple[str, Optional[StyleType]]]): An iterable of tuples containing str content and style. Returns: Text: Returns self for chaining. @@ -1204,8 +1209,7 @@ class Text(JupyterMixin): Args: console (Console): Console instance. - width (int): Number of characters per line. - emoji (bool, optional): Also render emoji code. Defaults to True. + width (int): Number of cells available per line. justify (str, optional): Justify method: "default", "left", "center", "full", "right". Defaults to "default". overflow (str, optional): Overflow method: "crop", "fold", or "ellipsis". Defaults to None. tab_size (int, optional): Default tab size. Defaults to 8. From 6fd3734f12f6fabc3ac85d4fdcf194077ff9fa37 Mon Sep 17 00:00:00 2001 From: Darren Burns Date: Tue, 7 Nov 2023 11:27:56 +0000 Subject: [PATCH 02/10] Improve wording in a docstring --- rich/containers.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/rich/containers.py b/rich/containers.py index e29cf368..901ff8ba 100644 --- a/rich/containers.py +++ b/rich/containers.py @@ -1,13 +1,13 @@ from itertools import zip_longest from typing import ( - Iterator, + TYPE_CHECKING, Iterable, + Iterator, List, Optional, + TypeVar, Union, overload, - TypeVar, - TYPE_CHECKING, ) if TYPE_CHECKING: @@ -119,7 +119,7 @@ class Lines: Args: console (Console): Console instance. - width (int): Number of characters per line. + width (int): Number of cells available per line. justify (str, optional): Default justify method for text: "left", "center", "full" or "right". Defaults to "left". overflow (str, optional): Default overflow for text: "crop", "fold", or "ellipsis". Defaults to "fold". From 21c0f25869bcdd0ef4e8ebc8d48c4b362147f740 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 7 Nov 2023 12:03:59 +0000 Subject: [PATCH 03/10] Bump actions/checkout from 2 to 4 (#3122) Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 4. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v2...v4) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/codeql.yml | 2 +- .github/workflows/codespell.yml | 2 +- .github/workflows/newissue.yml | 2 +- .github/workflows/pythonpackage.yml | 2 +- .github/workflows/readmechanged.yml | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) 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 }} From cb211d5b89e7e80f61cb22f0e4b4dce0ee907d4b Mon Sep 17 00:00:00 2001 From: Darren Burns Date: Tue, 7 Nov 2023 13:45:51 +0000 Subject: [PATCH 04/10] Fix docstring typos --- rich/text.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rich/text.py b/rich/text.py index b9b35055..7091e429 100644 --- a/rich/text.py +++ b/rich/text.py @@ -637,9 +637,9 @@ class Text(JupyterMixin): """Highlight words with a style. Args: - words (Iterable[str]): Worlds to highlight. + words (Iterable[str]): Words to highlight. style (Union[str, Style]): Style to apply. - case_sensitive (bool, optional): Enable case sensitive matchings. Defaults to True. + case_sensitive (bool, optional): Enable case sensitive matching. Defaults to True. Returns: int: Number of words highlighted. From b97abfcaccb7ff137360e922d557acf34c26a708 Mon Sep 17 00:00:00 2001 From: Darren Burns Date: Tue, 7 Nov 2023 15:48:40 +0000 Subject: [PATCH 05/10] Add missing Panel.fit parameters (#3192) * Add parameters missing from Panel.fit * Update CHANGELOG --- CHANGELOG.md | 6 ++++++ rich/panel.py | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1113f861..f68d33c0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,12 @@ 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 + +- Adds missing parameters to Panel.fit https://github.com/Textualize/rich/issues/3142 + ## [13.6.0] - 2023-09-30 ### Added diff --git a/rich/panel.py b/rich/panel.py index d522d80b..95f4c84c 100644 --- a/rich/panel.py +++ b/rich/panel.py @@ -82,7 +82,9 @@ class Panel(JupyterMixin): style: StyleType = "none", border_style: StyleType = "none", width: Optional[int] = None, + height: Optional[int] = None, padding: PaddingDimensions = (0, 1), + highlight: bool = False, ) -> "Panel": """An alternative constructor that sets expand=False.""" return cls( @@ -96,7 +98,9 @@ class Panel(JupyterMixin): style=style, border_style=border_style, width=width, + height=height, padding=padding, + highlight=highlight, expand=False, ) From c82777bd5016c68f2d433fe594e78aa08d967505 Mon Sep 17 00:00:00 2001 From: Pedro Aaron Date: Tue, 7 Nov 2023 10:55:58 -0500 Subject: [PATCH 06/10] =?UTF-8?q?=E2=9C=8F=EF=B8=8F=20Fix=20micro-typo=20i?= =?UTF-8?q?n=20README.es.md=20(#3145)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * ✏️ Fix micro-typo in` README.es.md` * Update CONTRIBUTORS.md --------- Co-authored-by: Pedro Luis Aaron Robles Co-authored-by: Darren Burns --- CONTRIBUTORS.md | 1 + README.es.md | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index 72f88eeb..bff51eea 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) 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 ![Console Markup](https://github.com/textualize/rich/raw/master/imgs/where_there_is_a_will.png) -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 ![Log](https://github.com/textualize/rich/raw/master/imgs/inspect.png) -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 From 238cf7bd98a73d3ed601f918c67c5e09729df89c Mon Sep 17 00:00:00 2001 From: Ekin Aksu <91148774+ekinpy@users.noreply.github.com> Date: Tue, 7 Nov 2023 19:16:24 +0300 Subject: [PATCH 07/10] Update README.tr.md (#3162) Co-authored-by: Darren Burns --- README.tr.md | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) 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. ![Features](https://github.com/textualize/rich/raw/master/imgs/features.png) @@ -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ş ![Hello World](https://github.com/textualize/rich/raw/master/imgs/hello_world.png) -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 Markup](https://github.com/textualize/rich/raw/master/imgs/where_there_is_a_will.png) -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 ![Log](https://github.com/textualize/rich/raw/master/imgs/inspect.png) -[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. ![progress](https://github.com/textualize/rich/raw/master/imgs/progress.gif) -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. ![progress](https://github.com/textualize/rich/raw/master/imgs/downloader.gif) -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: ![markdown](https://github.com/textualize/rich/raw/master/imgs/tree.png) -[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. ![traceback](https://github.com/textualize/rich/raw/master/imgs/traceback.png) @@ -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. ![Rich CLI](https://raw.githubusercontent.com/Textualize/rich-cli/main/imgs/rich-cli-splash.jpg) @@ -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. From 92e7164773ab1a0dd438ba43fee5d3b76b28ba1a Mon Sep 17 00:00:00 2001 From: AaronBeaudoin Date: Tue, 7 Nov 2023 11:04:31 -0600 Subject: [PATCH 08/10] Fix #3104 (#3105) * Fix #3104 * Fixing tests to account for new inline styles in HTML export * Update changelog * Add Aaron Beaudoin to contributors file. --------- Co-authored-by: Darren Burns --- CHANGELOG.md | 4 ++++ CONTRIBUTORS.md | 1 + rich/_export_format.py | 2 +- tests/test_console.py | 6 +++--- 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f68d33c0..3562f6df 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Adds missing parameters to Panel.fit https://github.com/Textualize/rich/issues/3142 +### Fixed + +- Ensure font is correctly inherited in exported HTML https://github.com/Textualize/rich/issues/3104 + ## [13.6.0] - 2023-09-30 ### Added diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index bff51eea..ba8759ea 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -73,3 +73,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/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}
""" diff --git a/tests/test_console.py b/tests/test_console.py index a3b73793..36d15df0 100644 --- a/tests/test_console.py +++ b/tests/test_console.py @@ -529,7 +529,7 @@ def test_export_html(): console.print("[b]foo