Skip to content

Commit

Permalink
missed files
Browse files Browse the repository at this point in the history
  • Loading branch information
willmcgugan committed Mar 1, 2020
1 parent 2a53a15 commit 6246b1d
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
Binary file added imgs/traceback.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added imgs/traceback_windows.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions rich/protocol.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
from typing import Any


def is_renderable(test_renderable: Any) -> bool:
"""Check if an object may be rendered by Rich."""
return (
isinstance(test_renderable, str)
or hasattr(test_renderable, "__console__")
or hasattr(test_renderable, "__rich__")
)

0 comments on commit 6246b1d

Please sign in to comment.