From 96760b9e369797f7762fe428116b75849b0a3b28 Mon Sep 17 00:00:00 2001 From: Paul Sanders Date: Sun, 6 Mar 2022 19:23:39 -0500 Subject: [PATCH] Fix print_json indent type to Union[None, int, str] --- rich/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rich/__init__.py b/rich/__init__.py index ed11f5d7..01faa6e6 100644 --- a/rich/__init__.py +++ b/rich/__init__.py @@ -1,7 +1,7 @@ """Rich text and beautiful formatting in the terminal.""" import os -from typing import Callable, IO, TYPE_CHECKING, Any, Optional +from typing import Callable, IO, TYPE_CHECKING, Any, Optional, Union from ._extension import load_ipython_extension @@ -73,7 +73,7 @@ def print_json( json: Optional[str] = None, *, data: Any = None, - indent: int = 2, + indent: Union[None, int, str] = 2, highlight: bool = True, skip_keys: bool = False, ensure_ascii: bool = True,