| Server IP : 217.160.0.135 / Your IP : 216.73.217.85 Web Server : Apache System : Linux www 6.18.52-i1-ampere #1203 SMP Mon Sep 14 18:29:59 CEST 2026 aarch64 User : sws1074145052 ( 1074145052) PHP Version : 8.3.32 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /lib/python3/dist-packages/pip/_vendor/rich/__pycache__/ |
Upload File : |
�
�/�c� � � � d dl mZmZ d dlmZmZmZmZ ddlm Z ddl
mZmZ G d� d� � Z
edk �rKd d lZd d lZ ej d
�� � Ze� dd
d�� � e� dddedd�� � e� � � Zd dlmZ e� � Z ed�� � Z ej dk rej � � � Zn= eej d� � 5 Z e � � � Zd d d � � n# 1 swxY w Y nB# e!$ r:Z"e�# dej �de"� �� � ej$ d� � Y d Z"["nd Z"["ww xY we�# e
eej% �� � d�� � d S d S ) � )�loads�dumps)�Any�Callable�Optional�Union� )�Text)�JSONHighlighter�NullHighlighterc � � e Zd ZdZ ddededeef ded ed
ededed
ee e
ge
f deddfd�Ze dde
dedeef ded ed
ededed
ee e
ge
f dedd fd�� � Z
defd�ZdS )�JSONa_ A renderable which pretty prints JSON.
Args:
json (str): JSON encoded data.
indent (Union[None, int, str], optional): Number of characters to indent by. Defaults to 2.
highlight (bool, optional): Enable highlighting. Defaults to True.
skip_keys (bool, optional): Skip keys not of a basic type. Defaults to False.
ensure_ascii (bool, optional): Escape all non-ascii characters. Defaults to False.
check_circular (bool, optional): Check for circular references. Defaults to True.
allow_nan (bool, optional): Allow NaN and Infinity values. Defaults to True.
default (Callable, optional): A callable that converts values that can not be encoded
in to something that can be JSON encoded. Defaults to None.
sort_keys (bool, optional): Sort dictionary keys. Defaults to False.
� TFN�json�indent� highlight� skip_keys�ensure_ascii�check_circular� allow_nan�default� sort_keys�returnc
�� � t |� � }
t |
||||||| �� � }|rt � � n
t � � } ||� � | _ d| j _ d | j _ d S )N�r �skipkeysr r r r r T)r r r r �text�no_wrap�overflow)�selfr r r r r r r r r �data�highlighters �7/usr/lib/python3/dist-packages/pip/_vendor/rich/json.py�__init__z
JSON.__init__ s� � � �T�{�{������%�)����
�
�
�� ,5�K�o�'�'�'�/�:K�:K���K��%�%�� � �� ��!�� ���� r! c
�� � | � | � � }
t |||||||| �� � }|rt � � n
t � � } ||� � |
_ d|
j _ d|
j _ |
S )a| Encodes a JSON object from arbitrary data.
Args:
data (Any): An object that may be encoded in to JSON
indent (Union[None, int, str], optional): Number of characters to indent by. Defaults to 2.
highlight (bool, optional): Enable highlighting. Defaults to True.
default (Callable, optional): Optional callable which will be called for objects that cannot be serialized. Defaults to None.
skip_keys (bool, optional): Skip keys not of a basic type. Defaults to False.
ensure_ascii (bool, optional): Escape all non-ascii characters. Defaults to False.
check_circular (bool, optional): Check for circular references. Defaults to True.
allow_nan (bool, optional): Allow NaN and Infinity values. Defaults to True.
default (Callable, optional): A callable that converts values that can not be encoded
in to something that can be JSON encoded. Defaults to None.
sort_keys (bool, optional): Sort dictionary keys. Defaults to False.
Returns:
JSON: New JSON object from the given data.
r TN)�__new__r r r r r r )
�clsr! r r r r r r r r �
json_instancer r"