docstrings black

This commit is contained in:
Will McGugan 2021-07-19 21:50:22 +01:00
parent 383b8c51af
commit 8ae1d4ad0a
3 changed files with 11 additions and 2 deletions

View file

@ -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

View file

@ -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.

View file

@ -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