mirror of
https://github.com/Textualize/rich.git
synced 2025-08-04 18:18:22 +00:00
docstrings black
This commit is contained in:
parent
383b8c51af
commit
8ae1d4ad0a
3 changed files with 11 additions and 2 deletions
|
@ -5,6 +5,14 @@ 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.6.1] - Unreleased
|
||||
|
||||
### Added
|
||||
|
||||
- Added Text.apply_meta
|
||||
- Added meta argument to Text.assemble
|
||||
- Added Style.from_meta
|
||||
|
||||
## [10.6.0] - 2021-07-12
|
||||
|
||||
### Deprecated
|
||||
|
|
|
@ -289,6 +289,7 @@ class Text(JupyterMixin):
|
|||
overflow (str, optional): Overflow method: "crop", "fold", "ellipsis". 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 8.
|
||||
meta (Dict[str, Any], optional). Meta data to apply to text, or None for no meta data. Default to None
|
||||
|
||||
Returns:
|
||||
Text: A new text instance.
|
||||
|
@ -396,7 +397,7 @@ class Text(JupyterMixin):
|
|||
def apply_meta(
|
||||
self, meta: Dict[str, Any], start: int = 0, end: Optional[int] = None
|
||||
) -> None:
|
||||
"""Apply metadata to the text, or a portion of the text.
|
||||
"""Apply meta data to the text, or a portion of the text.
|
||||
|
||||
Args:
|
||||
meta (Dict[str, Any]): A dict of meta information.
|
||||
|
|
|
@ -224,4 +224,4 @@ def test_meta():
|
|||
def test_from_meta():
|
||||
style = Style.from_meta({"foo": "bar"})
|
||||
assert style.color is None
|
||||
assert style.bold is None
|
||||
assert style.bold is None
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue