U
Ê—Rez ã @ s† d dl mZ G dd„ deƒZedkr‚d dlmZ eƒ Zeeeeƒƒ eeeeƒƒ G dd„ dƒZ e ƒ Z
eee
eƒƒ eedeƒƒ d S )
é )ÚABCc @ s$ e Zd ZdZeeedœdd„ƒZdS )ÚRichRenderablea# An abstract base class for Rich renderables.
Note that there is no need to extend this class, the intended use is to check if an
object supports the Rich renderable protocol. For example::
if isinstance(my_object, RichRenderable):
console.print(my_object)
)ÚotherÚreturnc C s t |dƒpt |dƒS )z6Check if this class supports the rich render protocol.Ú__rich_console__Ú__rich__)Úhasattr)Úclsr © r
úƒ/builddir/build/BUILDROOT/alt-python38-pip-22.2.1-2.el8.x86_64/opt/alt/python38/lib/python3.8/site-packages/pip/_vendor/rich/abc.pyÚ__subclasshook__ s zRichRenderable.__subclasshook__N)Ú__name__Ú
__module__Ú__qualname__Ú__doc__ÚclassmethodÚtypeÚboolr r
r
r
r r s
r Ú__main__)ÚTextc @ s e Zd ZdS )ÚFooN)r
r r r
r
r
r r s r Ú N)Úabcr r r
Úpip._vendor.rich.textr ÚtÚprintÚ
isinstancer Úfr
r
r
r Ú