mirror of
https://github.com/Textualize/rich.git
synced 2025-08-04 01:58:24 +00:00
relative imports
This commit is contained in:
parent
7da3ee6299
commit
2c16eb051a
3 changed files with 7 additions and 8 deletions
|
@ -44,7 +44,7 @@ Occasionally you may want to print something that Rich would interpret as markup
|
|||
>>> print("foo\[bar]")
|
||||
foo[bar]
|
||||
|
||||
The function :func:`~rich.markup.escape` will handle escape of text for you.
|
||||
The function :func:`~rich.markup.escape` will handle escaping of text for you.
|
||||
|
||||
Rendering Markup
|
||||
----------------
|
||||
|
|
|
@ -4,12 +4,11 @@ from logging import Handler, LogRecord
|
|||
from pathlib import Path
|
||||
from typing import ClassVar, List, Optional, Type
|
||||
|
||||
from rich._log_render import LogRender
|
||||
from rich.console import Console
|
||||
from rich.highlighter import Highlighter, ReprHighlighter
|
||||
from rich.text import Text
|
||||
|
||||
from . import get_console
|
||||
from ._log_render import LogRender
|
||||
from .console import Console
|
||||
from .highlighter import Highlighter, ReprHighlighter
|
||||
from .text import Text
|
||||
|
||||
|
||||
class RichHandler(Handler):
|
||||
|
|
|
@ -58,8 +58,8 @@ def test_render():
|
|||
|
||||
|
||||
def test_render_not_tags():
|
||||
result = render('[[1], [1,2,3,4], ["hello"], [None], [False], [True]]')
|
||||
assert str(result) == '[[1], [1,2,3,4], ["hello"], [None], [False], [True]]'
|
||||
result = render('[[1], [1,2,3,4], ["hello"], [None], [False], [True]] []')
|
||||
assert str(result) == '[[1], [1,2,3,4], ["hello"], [None], [False], [True]] []'
|
||||
assert result.spans == []
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue