o 7]h @sddlmZddlmZmZddlZddlmZddlm Z ddl m Z ddl m Z dd lmZ    dd d d eed eedeedeedef ddZdS))Mapping)AnyOptionalN) JustifyMethod)box)ReprHighlighter)Pretty)TablemappingzMapping[Any, Any]titlecaption title_justifycaption_justifyreturnc Cstdttd||tjdd}||_||_|dur||_|dur$||_ t }| D]\}}| t ||dt ||dq+|S)aGenerate a simple table from a mapping. Args: mapping (Mapping): A mapping object (e.g. a dict); title (str, optional): Optional title to be displayed over the table. caption (str, optional): Optional caption to be displayed below the table. title_justify (str, optional): Justify method for title. Defaults to None. caption_justify (str, optional): Justify method for caption. Defaults to None. Returns: Table: A table instance which may be rendered by the Console. z/tabulate_mapping will be deprecated in Rich v11Fblue) show_headerr r r border_styleN) highlighter)warningswarnDeprecationWarningr rROUNDEDr r rrritemsadd_rowr ) r r r rrtablerkeyvaluer;/usr/lib/python3/dist-packages/pip/_vendor/rich/tabulate.pytabulate_mapping s( r )NNNN)collections.abcrtypingrrrpip._vendor.rich.consolerrrrprettyr rr strr rrrrs2