Skip to content

Commit

Permalink
tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
willmcgugan committed Feb 23, 2020
1 parent dfefa23 commit 188ef64
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 1 addition & 2 deletions rich/console.py
Original file line number Diff line number Diff line change
Expand Up @@ -680,8 +680,7 @@ def check_text() -> None:
if isinstance(renderable, ConsoleRenderable):
check_text()
append(renderable)
continue
if isinstance(renderable, str):
elif isinstance(renderable, str):
render_str = renderable
if emoji:
render_str = _emoji_replace(render_str)
Expand Down
6 changes: 5 additions & 1 deletion rich/rule.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ def __init__(
character: str = "─",
style: Union[str, Style] = "rule.line",
) -> None:
if len(character) != 1:
raise ValueError(
"Rule requires character argument to be a string of length 1"
)
self.title = title
self.character = character
self.style = style
Expand Down Expand Up @@ -49,7 +53,7 @@ def __console__(self, console: Console, options: ConsoleOptions) -> RenderResult
yield rule_text


if __name__ == "__main__":
if __name__ == "__main__": # pragma: no cover
from .console import Console

c = Console()
Expand Down

0 comments on commit 188ef64

Please sign in to comment.